javascript - How do i dissable the bootstrap popover on page resize -
i using bootstrap
popover
drop down
menu. there way disable popover
function either css media queries
or jquery
on page resize , make menu visible , vertical in mobile view.
here i've tried:
<a href="#" id="ble" class="ved" data-placement="bottom" data-toggle="popover" data-content=' <ul class="nav nav-pill"> <li><a href="#" >home</a></li> <li><a href="#" >home</a></li> </ul> '>toggle popover</a> </div> <script> $(document).ready(function(){ $('#ble').popover({html:true}); $(window).on('resize', function () { if ($window.width() > 300) { $('#ble').unbind('popover'); } }); });
would more easier if doing media queries css.
@media (max-width: 300px) { #ble {display: none;} }
Comments
Post a Comment