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

From: Date: Thu, 30 Dec 2010 15:20:16 +0000
Subject: Re: svn: /web/php/trunk/js/ common.js
References: 1 2  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-10025@lists.php.net to get a copy of this message
On Thu, Dec 30, 2010 at 12:46, Paul Dragoonis <dragoonis@gmail.com> wrote: > On Thu, Dec 30, 2010 at 11:01 AM, Hannes Magnusson <bjori@php.net> 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

« previous php.webmaster (#10025) next »