Re: [PHP-WEBMASTER] svn: /web/php/trunk/js/ common.js

[email protected] (Hannes Magnusson)
Newsgroups php.webmaster
Message-ID <[email protected]>
On Thu, Dec 30, 2010 at 12:46, Paul Dragoonis <[email protected]> wrote:
> On Thu, Dec 30, 2010 at 11:01 AM, Hannes Magnusson <[email protected]> wrote:
>> bjori                                    Thu, 30 Dec 2010 11:01:04 +0000
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=306854
>>
>> Log:
>> quicktoc for articles/chapters too
>>
>> Changed paths:
>>    U   web/php/trunk/js/common.js
>>
>> Modified: web/php/trunk/js/common.js
>> ===================================================================
>> --- web/php/trunk/js/common.js  2010-12-30 10:36:53 UTC (rev 306853)
>> +++ web/php/trunk/js/common.js  2010-12-30 11:01:04 UTC (rev 306854)
>> @@ -95,7 +95,7 @@
>>         $($(".footmenu")[1]).append("<li><a href='" + bugurl + "'>Report bug on this page</a></li>");
>>
>>         var l = "";
>> -        $(".refsect1 h3").each(function() {
>> +        $(".refsect1 h3, .sect1 h2, .sect2 h3, .sect3 h4").each(function() {
>>             var id = $(this).parent().attr("id");
>>             l += "<li><a href='#" + id + "'>" + $(this).text() + "</a></li>";
>>         });
>>
>>
>> --
>> PHP Webmaster List Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> Hi Hannes,
> I was looking to finish this important piece of functionality, the
> missing link now is getting phd to add ID's onto the refsect areas.
> I was also thinking of not using anchors but instead using jQuery's
> scrollTo() plugin to animate the anchor jump.
> If we do it like this, we don't need to modify phd to add ID's to any
> of the elements we can just do jQuery.scrollTo($(this).parent());

PhD already extracts all the ID tag from the sources and uses them in
the markup.
I don't have anything against using scrollTo() though.

-Hannes
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.