[wp-hackers] Start of new themes page
David House
dmhouse at gmail.com
Sun May 29 12:09:43 GMT 2005
On 5/29/05, Matthew Mullenweg <m at mullenweg.com> wrote:
> Bonus points to whoever can make location.hash autotrigger scrolling to
> that ID in the frame, which would make the individual themes more
> linkable. I tried to put something in the ss_fixAllLinks link loop but
> it never triggered SmoothScroll right.
Would something like the attached work? I haven't tested it but it
seems simple enough.
I don't actually think smooth scrolling here would be desirable. When
you enter a specific URL, you expect to be taken to that URL, not
taken to a similar one then redirected to the actual URL you entered.
When you enter /extend/themes/#foo, you expect to be taken directly to
theme 'foo', not taken to /extend/themes/ and be redirected (or
scrolled) to theme 'foo'.
--
-David House, dmhouse at gmail.com, http://xmouse.ithium.net
-------------- next part --------------
// allow /extend/themes/#foo to act as if the link for theme 'foo' had be clicked
function autoScrollToTheme() {
if (window.location.hash) {
frames['themes'].window.hash = window.location.hash;
}
}
addEvent('window', 'load', 'autoScrollToTheme');
More information about the wp-hackers
mailing list