jquery - Multiple bootstrap popovers are created instead of dismissing old one -


i'm creating event calendar , need bootstrap popovers on inlined jquery ui datepicker.

currently have (by reason popover isn't created in jsfiddle @ all:

https://jsfiddle.net/vxnhmeop/4/

but problem when click on day event new popover instance created. if click second time new popover created on top , old popover stays also. how dismiss old popover?

i've tried replacing line of code

$("td[title='" + title + "']").popover(options).popover('toggle'); 

with

$("td[title='" + title + "']").popover(options).popover('show'); $("td[title='" + title + "']").popover(options).popover('hide'); 

to see if atleast hides failed.

you need remove displayed popovers before showing new one.

add :

$('.popover').each(function (){     $(this).remove(); }); 

before

$("td[title='" + title + "']").popover(options).popover('show'); 

and should work fine.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -