You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 regels
604 B

(function(a){function f(a){i(),g(),d=a.find("ul").css("visibility","visible")}function g(){d&&(d.css("visibility","hidden"),d=null)}function h(){c=window.setTimeout(g,b)}function i(){c&&(window.clearTimeout(c),c=null)}function j(a){d&&a.has(d[0]).length?g():f(a)}var b=100,c=0,d=null,e="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch;a.fn.make_dropdown=function(c){return this.each(function(){c&&c.timeout&&(b=c.timeout),a(this).click(function(b){j(a(this)),b.stopPropagation()}),e||a(this).mouseover(function(){f(a(this))}).mouseout(h)})},a(document).click(g)})(jQuery);