typo3 - jquery dropdown hide when click inside -


i'm new jquery, maybe easy question, havent found answer till now. maybe havent found right keywords search for...

i have dropdown login form. use in typo3. problem is: click inside loginform hides/toggle drobdownbox. here script:

<script type="text/javascript">             $(function() {                 var button = $('#loginbutton');                 var box = $('#loginbox');                 var form = $('#loginform');                 button.removeattr('href');                 button.mouseup(function(login) {                     box.slidetoggle();                     button.toggleclass('active');                 });                 form.mouseup(function() {                     return false;                     });                 $(document).mouseup(function(login) {                     if(!($(login.target).parents('#loginbutton').length > 0)) {                         button.removeclass('active');                         box.hide();                     }                 });             });          </script>   

maybe can help? in advance!

use that:

    $('selector').mouseenter(function(){      //do when mouse on     }).mouseleave(function(){      //do when mouse out     }); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -