Commit: 08c940a733aa55fee4c8ee52b461a4c0c113b49f Author: Hannes Magnusson <[email protected]> Thu, 30 Dec 2010 11:36:57 +0000 Parents: 91d827742a0717908ebcf50c12accc5a91befb10 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=08c940a733aa55fee4c8ee52b461a4c0c113b49f Log: Make it easier to reference specific parts on the page by showing the anchors # Idea stolen from Norman Walsh, among others :) Changed paths: M js/common.js M styles/theme.css Diff: diff --git a/js/common.js b/js/common.js index 1651de2..496b9fb 100644 --- a/js/common.js +++ b/js/common.js @@ -105,6 +105,9 @@ $(document).ready(function() { $("#quicktoc").remove(); } } + $(".docs div[id] > h1, .docs div[id] > h2, .docs div[id] > h3, .docs div[id] > h4").each(function(){ + $(this).append("<a class='genanchor' href='#" + $(this).parent().attr("id") + "'> ΒΆ</a>"); + }); }); diff --git a/styles/theme.css b/styles/theme.css index e68a371..ceb5126 100644 --- a/styles/theme.css +++ b/styles/theme.css @@ -277,3 +277,14 @@ pre.info { #mega-drop-down a { color: #ccc; } + + +/* {{{ The anchor for section headers */ +a.genanchor { + color: #fff; +} +a.genanchor:hover { + color: #000; +} +/* }}} */ + -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
