打开主菜单

少前百科GFwiki β

更改

Widget:InnCollapse

删除139字节2020年12月27日 (日) 01:04
- ▼ -- ▲ -
<includeonly><script type="text/javascript">(window.RLQ=window.RLQ||[]).push(function(){
/* 调用多次时仅添加一次事件 */
if(!thisCollapse){
forInnColResize();})
}
 
/*  折叠展开   */
function forInnCollapse(element){
  if($(element).next().prop("nodeName") == "P" && !($(element).next().html())){ var nextElement = $(element).next().next(); $(element).next().css("display", "none");}else{var nextElement = $(element).next();}
if($(element).attr("status") == "none"){
$(element).attr("status", "visible");
$(element).children().children("img.innCollapse_sign").attrhtml("src", "http://www.gfwiki.org/images/8/8d/InnCollapse_up.png- ▲ -");
nextElement.slideDown("fast");}
else{
$(element).attr("status", "none");
$(element).children().children("img.innCollapse_sign").attrhtml("src", "http://www.gfwiki.org/images/a/ac/InnCollapse_down.svg- ▼ -");
nextElement.slideUp("fast");}
}
function forInnColResize() {
  var thisE = $(".innCollapse");
thisE.next().css("display", "none"); if(thisE.attr("widthset")){ thisE.children().width(thisE.attr("widthset"));} else{ var nextE = thisE.next().next(); thisE.children().width(parseInt(Number(nextE.width()) - 40));} thisE.children().css("max-width", parseInt(Number(thisE.parent().width()) -40)); thisE.unbind('click').removeAttr('onclick').click(function(){ forInnCollapse(this);});
}
})</script><div class="innCollapse" status="none" ><span style="border:4px solid; display:inline-block; color:<!--{if ($widthtext)}-->widthset="<!--{$widthtext}-->"<!--{else}-->#000000<!--{/if}-->><span style="border:4px solid; display:inline-block; color:#000; padding:0.5rem 1rem; border-radius:0px; cursor:pointer; background:<!--{if ($color)}--><!--{$color}--><!--{else}-->#f4c430<!--{/if}-->; border-image:url(//www.gfwiki.org/images/vectorize_border/border_dot.svg); border-image-slice:2; border-image-width:2px; background-clip:padding-box; transition:all 0.1s ease-in-out; user-select:none; width:90<!--{if ($width)}--><!--{$width}--><!--{else}-->100%<!--{/if}-->;"><img span style="float:right; maxfont-widthweight:22pxbolder;" class="innCollapse_icon" src = "http://www.gfwiki.org/images/a/ac/InnCollapse_down.svginnCollapse_sign">- ▼ -</span><!--{$title}--></span></div></includeonly>
24,691
个编辑