Skip to content
Snippets Groups Projects
Unverified Commit 3283386a authored by Luke Bennett's avatar Luke Bennett
Browse files

use jquery object in togglePopover

parent 8d43fe4e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,12 +2,13 @@ import $ from 'jquery';
import _ from 'underscore';
 
export function togglePopover(show) {
const isAlreadyShown = this.hasClass('js-popover-show');
const $popover = $(this);
const isAlreadyShown = $popover.hasClass('js-popover-show');
if ((show && isAlreadyShown) || (!show && !isAlreadyShown)) {
return false;
}
this.popover(show ? 'show' : 'hide');
this.toggleClass('disable-animation js-popover-show', show);
$popover.popover(show ? 'show' : 'hide');
$popover.toggleClass('disable-animation js-popover-show', show);
 
return true;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment