svn: /web/php/trunk/ js/common.js styles/theme.css

From: Date: Thu, 30 Dec 2010 11:36:57 +0000
Subject: svn: /web/php/trunk/ js/common.js styles/theme.css
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-10021@lists.php.net to get a copy of this message
bjori Thu, 30 Dec 2010 11:36:57 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306856 Log: Make it easier to reference specific parts on the page by showing the anchors # Idea stolen from Norman Walsh, among others :) Changed paths: U web/php/trunk/js/common.js U web/php/trunk/styles/theme.css Modified: web/php/trunk/js/common.js =================================================================== --- web/php/trunk/js/common.js 2010-12-30 11:18:06 UTC (rev 306855) +++ web/php/trunk/js/common.js 2010-12-30 11:36:57 UTC (rev 306856) @@ -105,6 +105,9 @@ $("#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>"); + }); }); Modified: web/php/trunk/styles/theme.css =================================================================== --- web/php/trunk/styles/theme.css 2010-12-30 11:18:06 UTC (rev 306855) +++ web/php/trunk/styles/theme.css 2010-12-30 11:36:57 UTC (rev 306856) @@ -277,3 +277,14 @@ #mega-drop-down a { color: #ccc; } + + +/* {{{ The anchor for section headers */ +a.genanchor { + color: #fff; +} +a.genanchor:hover { + color: #000; +} +/* }}} */ +

« previous php.webmaster (#10021) next »