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>
  • 相关阅读:
    Python—模块
    Python之路_Day5
    Python之路_Day4
    Py获取本机指定网卡的ip地址
    Python之路_Day3
    Python之路—Day2作业
    Python之路—Day2
    Python之路—Day1作业
    Python之路—Day1
    Python数据类型
  • 原文地址:https://www.cnblogs.com/lxthyme/p/4861650.html
Copyright © 2011-2022 走看看