jquery - Trigger bootstrap tooltip options via javascript -
pls right way pass options via javascript bootstrap tooltip/popover: via data attributes works in:
<input type="text" data-toggle="tooltip" data-placement="right" data-animation="fade" data-delay="200" data-trigger="focus" data-content="foo"> but using javascript doesn't:
<script> jquery(function ($) { $("input").popover()({ animation:"fade", delay: "200", trigger:"focus", placement: "right" }); }); </script> what right syntax?
for tooltip, should be:
jquery(function ($) { $("input").tooltip({...}); }); instead of:
jquery(function ($) { $("input").popover({...}); }); update: sorry mis-confusions, it works here but:
popover()({...}); should
popover({...}); html:
<input type="text" data-toggle="tooltip" data-placement="right" data-animation="fade" data-delay="200" data-trigger="focus" data-content="foo"> js:
jquery(function ($) { $("input").popover({ animation:"fade", delay: "200", trigger:"focus", placement: "right" }); }); make sure have added javascript , css files properly.
Comments
Post a Comment