com web/php: Scroll to the parameter doc when clicking on it in the proto description: js/common.js
| From: | Paul Dragoonis | Date: | Sat, 01 Jan 2011 15:27:51 +0000 |
| Subject: | com web/php: Scroll to the parameter doc when clicking on it in the proto description: js/common.js | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-23689@lists.php.net to get a copy of this message | ||
Commit: 372c64f16c7770ab0b75ccec3c69c53cf4765449
Author: Hannes Magnusson <bjori@php.net> Sat, 1 Jan 2011 15:27:51 +0000
Parents: 5484b1bc673fe7551fb9f17f04bac6d7c557e253
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=372c64f16c7770ab0b75ccec3c69c53cf4765449
Log:
Scroll to the parameter doc when clicking on it in the proto description
Changed paths:
M js/common.js
Diff:
diff --git a/js/common.js b/js/common.js
index 4f756b1..353b088 100644
--- a/js/common.js
+++ b/js/common.js
@@ -171,6 +171,15 @@ $(document).ready(function() {
$(".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>");
});
+ $(".docs .methodparam .parameter").each(function (idx, node) {
+ $(".parameters .term i > tt.parameter").each(function (idx, param) {
+ if ($(param).text() == $(node).text().substring(1)) {
+ $(node).click(function() {
+ $.scrollTo($(param), 800);
+ });
+ }
+ });
+ });
});