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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -