bootstrapx-clickover
bootstrapx-clickover copied to clipboard
Option 'hide' does not work
Hi,
Sometime you may want to hide the Clickover after some action other than global click or timer and the default $.popover('hide') or $.clickover('hide') is buggy. I have hacked my way little bit to add another option 'forcehide' and intercept it:
Line 188:
if (typeof option == 'string') {
if (option === 'forcehide') data.clickery();
else data[option]();
}
This is just a work around for me to get it done :)
Cheers, Hugh
interesting, let me take a look.
Are you calling hide
in your own event handler?
Something like:
$(function() {
$('body').on('click', '#otherbutton', function(e) {
$('#clickover').clickover('hide');
e.preventDefault();
});
Yep, that what I do and the clickover does hide but next time when you trigger it, it won't show up. If you monitor on dev tools you will see the clickover div does get instantiated for a second then gets removed from the DOM tree straight
does that work differently if you do:
$('#clickover').data().clickover.hide()
I just ran in to this same issue - has there been any official update?
I was able to get around this by artificially firing a 'click' event on an outside element.
$('#element-outside-clickover').trigger('click')
Total hack, but it works for now ...
$('#element-outside-clickover').clickover('hide').attr("data-clickover-open", 0);
should do it