svn: /web/php/trunk/ js/common.js styles/theme.css
[email protected] (Hannes Magnusson)
| Newsgroups | php.webmaster |
|---|---|
| Message-ID | <[email protected]> |
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;
+}
+/* }}} */
+