jquery toggle disable click -
i have menu @ click of every item display div 'toggle' function, try click on menu item disabiletare selected or clicked. code used follows.
$(function() { $("#pul-m1").click(function() { $('#box-company').toggle('slide', { direction: 'left' }, 800); }); $('#pul-m1').unbind(click); });
where 'pul-m1' click toggle div opens 'box-company' pop-up left; when div opened button clicked on menu (pul-m1) disabled.
with code created click continues function activating toggle, did wrong?
use slidetoggle,and if want single click , disable clicked item.just use .one function of jquery
<script> $(function() { $('#box-company').hide(); $("#pul-m1").one('click',function(e) { $('#box-company').slidetoggle({ direction: 'left' }, 800); }); }); </script>
Comments
Post a Comment