User:夕舞八弦/common.js

$('.toc-custom').remove; var b = $(" 目 录  "); b.append($('#toc').children('ul').clone.removeAttr("style")); $("#toc").after(b); IsAnim=false; b.ready(function{       $("#rightToc").children("ul").wrap(" ");        $("#rtoculw").children("ul").attr('id','rtocul');    	console.log($("#rtoculw").outerWidth);        $("#rightToc").css("marginRight",-$("#rtoculw").outerWidth);        $('#rtocbt').on('mouseover',function{ if(IsAnim){ return; }           IsAnim=true; $("#rightToc").animate({               marginRight:'5px'            },"fast",function {                IsAnim=false;                $('#rightToc').addClass('rtshow');                $('#rightToc').removeClass('rthide');            }); });       $($("#rtoculw")[0]).on('mouseleave',function{ if(IsAnim){ return; }           IsAnim=true; $("#rightToc").animate({               marginRight:-$("#rtoculw").outerWidth            },"fast",function{                IsAnim=false;                $('#rightToc').addClass('rthide');                $('#rightToc').removeClass('rtshow');            }); });   });