javascript - Bootstrap tooltip onblur firing twice -
And I see that the blurred incident is saying twice for many people I'm sincere, I do not understand Why is why
Javascript:
// call tooltip initTooltip ($ element, {'trigger': 'manual', 'placement': 'down ',' Title ': message [$ element.id +' required ']}); InitTooltip: function ($ element, option) {console.log ('--- initTooltip ---'); // It is executing 1x $ ('#' + $ element.id). Tooltip ({'placement': options.placement, 'title': options.title, 'trigger': options.trigger}). {'Blur': function () {console.log ('ON BLUR EVENT'); // It is executing 2x. $ ('#' + $ Element.id) .tooltip ('show');}});
My paramans are coming correctly, my messages are all right when I log out everything. Just not sure how the stigma is being executed twice to get around the event
I have also tried to use the focusout
but no luck.
Whenever you call your initTooltip
function, Will be removed.
You can finally reconsider your code or move on to the jQuery on jQuery event handler
:
for elements Attach handler to an event Handler is generated per element once per event.
Demo:
Comments
Post a Comment