javascript - Bootstrap Popover Dismissable is not working -
<a href="#" class="btn btn-warning" id="no_mls_entry" tabindex="2" data-toggle="popover" data-trigger="focus" data-placement="left auto" title="early bird gets worm" data-content="sometimes takes time mls® rets pool update new listing. loading manually early, sharing on social media give improve exposure on google.">enter without mls #</a>
the above popover html syntax, set data-trigger="focus" according instructions create dismiss on click.
and on document ready, run this:
$('#no_mls_entry').popover('show');
the popover shows alright, on clicking it, not go away.
it appears issue way focus beingness managed.
you seek next forcefulness focus:
$('#no_mls_entry').popover('show').focus();
here illustration of code in bootply:
http://www.bootply.com/j1itfk9m1y
alternatively, if willing not show popover on page load, can load popover next code , triggered on pressing button:
$('#no_mls_entry').popover();
javascript html twitter-bootstrap popover
No comments:
Post a Comment