zoukankan      html  css  js  c++  java
  • Markdown 生成目录

     1 <link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">
     2 <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
     3 <script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>
     4 <script>hljs.initHighlightingOnLoad();</script>
     5 <script type="text/javascript">
     6 $(document).ready(function(){
     7 $("h2,h3,h4,h5,h6").each(function(i,item){
     8 var tag = $(item).get(0).localName;
     9 $(item).attr("id","wow"+i);
    10 $("#category").append('<a class="new'+tag+'" href="#wow'+i+'">'+$(this).text()+'</a></br>');
    11 $(".newh2").css("margin-left",0);
    12 $(".newh3").css("margin-left",20);
    13 $(".newh4").css("margin-left",40);
    14 $(".newh5").css("margin-left",60);
    15 $(".newh6").css("margin-left",80)
    16 });
    17 });
    18 </script>
    19 <div id="category"></div>
  • 相关阅读:
    Redis面试题
    redis基本操作
    pwd命令和cd命令
    ls命令详解
    Python时间操作所相关
    Nginx
    网络相关知识
    LeetCode 刷题记录(6-10题)
    绕过校园网Web认证
    Java相关知识
  • 原文地址:https://www.cnblogs.com/lxthyme/p/4861650.html
Copyright © 2011-2022 走看看