[jQuery] Re: Using a variable in a selector

2007-05-01 Thread Jörn Zaefferer
Justin Stockton schrieb: I'm dumb. This does work if you use the right selector. Based on the structure of my document, $('#foo dl') would never return anything since my definition list is a sibling of the header, not a child of. DOH! Ok, cool :-) It helps a lot to always test if your select

[jQuery] Re: Using a variable in a selector

2007-05-01 Thread Justin Stockton
I'm dumb. This does work if you use the right selector. Based on the structure of my document, $('#foo dl') would never return anything since my definition list is a sibling of the header, not a child of. DOH! On May 1, 5:45 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > Justin Stockton schrieb:

[jQuery] Re: Using a variable in a selector

2007-05-01 Thread Jörn Zaefferer
Justin Stockton schrieb: window.location returns the current URL in the browser's locator. window.location.hash refers to the specific part of the page that the URL refers too (the part that follow the #). So if you're visiting http://example.org/index.html#foo then window.location would return

[jQuery] Re: Using a variable in a selector

2007-04-30 Thread Justin Stockton
window.location returns the current URL in the browser's locator. window.location.hash refers to the specific part of the page that the URL refers too (the part that follow the #). So if you're visiting http://example.org/index.html#foo then window.location would return http://example.org/index.ht

[jQuery] Re: Using a variable in a selector

2007-04-30 Thread Jörn Zaefferer
poorgeek schrieb: I'm having the hardest time trying to figure out how to use a variable in a selector. I have the following code that works as part of a basic accordion menu but with a twist that if someone links to the page using an internal link then that section of the menu defaults to open.