filesbox/web/dist/design/index/component/dropdown/index.js

2 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
(function(){var s=$(".module[data-menuopenstyle]");s.each(function(t){var e=s.eq(t),n=e.attr("data-menuopenstyle"),c=e.attr("data-menuanimation"),i=e.find(".menuBox");if(i.css({transition:"all 0.3s"}),s.css("cursor","pointer"),n=="hover")if(c=="fadeIn")i.css("opacity",0),e.hover(function(){e.css("overflow","visible"),i.css({opacity:1})},function(){setTimeout(function(){e.css("overflow","hidden")},300),i.css({opacity:0})});else{var o=i.height();i.css({height:0,overflow:"hidden"}),e.css({overflow:"visible"}),e.hover(function(){i.css({height:o})},function(){i.css({height:0})})}if(n=="click")if(c=="fadeIn")i.css("opacity",0),e.click(function(){e.css("overflow","visible"),i.css({opacity:1})}),e.hover(function(){},function(){e.css("overflow","hidden"),i.css({opacity:0})});else{var o=i.height();i.css({height:0,overflow:"hidden"}),e.click(function(){e.css("overflow","visible"),i.css({height:o})}),e.hover(function(){},function(){i.css({height:0}),setTimeout(function(){i.css("height",o),e.css("overflow","hidden")},300)})}})})();