Skip to content

Instantly share code, notes, and snippets.

@cloudsben
Last active June 14, 2023 07:46

Revisions

  1. cloudsben revised this gist Aug 15, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions md-menu.html
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,8 @@
    $(".newh2").css("margin-left",0);
    $(".newh3").css("margin-left",20);
    $(".newh4").css("margin-left",40);
    $(".newh5").css("margin-left",60);
    $(".newh6").css("margin-left",80);
    });
    });
    </script>
  2. cloudsben revised this gist Aug 15, 2013. 1 changed file with 6 additions and 19 deletions.
    25 changes: 6 additions & 19 deletions md-menu.html
    Original file line number Diff line number Diff line change
    @@ -1,32 +1,19 @@
    <link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">

    <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>

    <script>hljs.initHighlightingOnLoad();</script>
    <script type="text/javascript">
    $(document).ready(function(){
    $("h2,h3,h4,h5,h6").each(function(i,item){
    var tag = $(item).get(0).localName;
    $(item).attr("id","wow"+i);
    $("#category").append('<a id="new'+tag+'" href="#wow'+i+'">'+$(this).text()+'</a></br>');
    $("#category").append('<a class="new'+tag+'" href="#wow'+i+'">'+$(this).text()+'</a></br>');
    $(".newh2").css("margin-left",0);
    $(".newh3").css("margin-left",20);
    $(".newh4").css("margin-left",40);
    });
    });
    </script>
    <style>
    pre code {
    break-word: break-all;
    word-wrap: break-word;
    }
    #newh2{
    margin-left:0px;
    }
    #newh3{
    margin-left:20px;
    }
    #newh4{
    margin-left:40px;
    }
    </style>

    <div id="category"></div>
  3. cloudsben revised this gist Jul 23, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion md-menu.html
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@
    word-wrap: break-word;
    }
    #newh2{
    margin-left:px;
    margin-left:0px;
    }
    #newh3{
    margin-left:20px;
  4. cloudsben created this gist Jul 23, 2013.
    32 changes: 32 additions & 0 deletions md-menu.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    <link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">

    <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>

    <script>hljs.initHighlightingOnLoad();</script>
    <script type="text/javascript">
    $(document).ready(function(){
    $("h2,h3,h4,h5,h6").each(function(i,item){
    var tag = $(item).get(0).localName;
    $(item).attr("id","wow"+i);
    $("#category").append('<a id="new'+tag+'" href="#wow'+i+'">'+$(this).text()+'</a></br>');
    });
    });
    </script>
    <style>
    pre code {
    break-word: break-all;
    word-wrap: break-word;
    }
    #newh2{
    margin-left:px;
    }
    #newh3{
    margin-left:20px;
    }
    #newh4{
    margin-left:40px;
    }
    </style>

    <div id="category"></div>