Web/js/jquery.supersubs.min.js
(完整代码) 1KB/*
* Supersubs v0.2b - jQuery plugin
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*
* This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
* their longest list item children. If you use this, please expect bugs and report them
* to the jQuery Google Group with the word 'Superfish' in the subject line.
*
*/
(function(a){a.fn.supersubs=function(i){var g=a.extend({},a.fn.supersubs.defaults,i);return this.each(function(){var f=a(this),c=a.meta?a.extend({},g,f.data()):g,j=a('<li id="menu-fontsize">—</li>').css({padding:0,position:"absolute",top:"-999em",width:"auto"}).appendTo(f).width();a("#menu-fontsize").remove();$ULs=f.find("ul");$ULs.each(function(d){d=$ULs.eq(d);var e=d.children(),k=e.children("a"),l=e.css("white-space","nowrap").css("float"),b=d.add(e).add(k).css({"float":"none",width:"auto"}).end().end()[0].clientWidth/
j;b+=c.extraWidth;if(b>c.maxWidth)b=c.maxWidth;else if(b<c.minWidth)b=c.minWidth;b+="em";d.css("width",b);e.css({"float":l,width:"100%","white-space":"normal"}).each(function(){var h=a(">ul",this),m=h.css("left")!==undefined?"left":"right";h.css(m,b)})})})};a.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
