com web/php: Restored the ability to click on a parameter in the function definition and it would scroll to the parameter description.: js/common.js

From: Date: Thu, 24 May 2012 21:05:34 +0000
Subject: com web/php: Restored the ability to click on a parameter in the function definition and it would scroll to the parameter description.: js/common.js
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-13588@lists.php.net to get a copy of this message
Commit: e1c8ca618209a4a7811dd24e2183b6c86f8ba823 Author: Levi Morrison <levim@php.net> Thu, 24 May 2012 15:05:34 -0600 Parents: 92cf25a6173fdc80f79b90520a94201070f2201a Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e1c8ca618209a4a7811dd24e2183b6c86f8ba823 Log: Restored the ability to click on a parameter in the function definition and it would scroll to the parameter description. Changed paths: M js/common.js Diff: diff --git a/js/common.js b/js/common.js index 576cc4c..718377d 100644 --- a/js/common.js +++ b/js/common.js @@ -230,11 +230,13 @@ $(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); + $(".docs .methodparam .parameter").click(function () { + var $node = $(this); + $(".parameters .term .parameter").each(function (idx, param) { + var $param = $(param); + if ($param.text() == $node.text().substring(1)) { + $node.click(function() { + $.scrollTo($param, 800); }); } });

« previous php.webmaster (#13588) next »