jquery - Popover does not display on hover -
using bootstrap popover, popover not appear on hover. appears when click link. appreciate help. tia
<script type="text/javascript"> $(function () { $('body').popover({ html: true, content: function () { return $(this).next().html(); }, selector: '.has-popover' }) }); </script> <body> <form id="form1" runat="server"> <div id="div1" style="margin: 80px 0 0 20px;" runat="server"> <a id="a1" style="text-decoration-style: dashed; text-decoration: dashed;" class="has-popover" href="#" rel="popover" data-placement="right" data-original-title="title goes here!" data-trigger="hover">hover popover</a> <div id="div3" style="display: none"> <div style="float: left; width: 15%;"> <img style="max-height: 75px; max-width: 75px;" src="style/x.png" /> </div> <div style="float: left; width: 85%;"> <ul> <li>blah blah blah</li> <li>yada yada yada</li> <li>blah blah blah</li> </ul> </div> </div> </div> </form>
by default popover triggered click
, not hover
.
you can change adding option:
trigger: 'hover'
so script should like:
<script type="text/javascript"> $(function () { $('body').popover({ html: true, content: function () { return $(this).next().html(); }, selector: '.has-popover', trigger: 'hover' // add option }) }); </script>
Comments
Post a Comment