svn: /web/php/trunk/js/ common.js

[email protected] (Hannes Magnusson)
Newsgroups php.webmaster
Message-ID <[email protected]>
bjori                                    Sat, 01 Jan 2011 15:27:51 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=306948

Log:
Scroll to the parameter doc when clicking on it in the proto description

Changed paths:
    U   web/php/trunk/js/common.js

Modified: web/php/trunk/js/common.js
===================================================================
--- web/php/trunk/js/common.js	2011-01-01 15:03:27 UTC (rev 306947)
+++ web/php/trunk/js/common.js	2011-01-01 15:27:51 UTC (rev 306948)
@@ -171,6 +171,15 @@
     $(".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);
+                });
+            }
+        });
+    });

 });
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.