Commit bdd1a46f authored by Luke Bennett's avatar Luke Bennett

use jquery object in togglePopover

parent 93199e5f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment