[jQuery] Re: quick question, selecting dynamic elements

2007-11-30 Thread leepowell
Your selector is still incorrect, this this instead: $("ul#specialsNav li a").click( function(){ var whichID = $(this).attr("id").replace(/_a_/, ""); $("#" + whichID).toggle(); return false; }); jvittetoe2 wrote: > > > here is my code.

[jQuery] Re: quick question, selecting dynamic elements

2007-11-30 Thread Josh V
here is my code. http://pastemonkey.org/paste/229 for some reason i still cant get this to work. instead of using the toggle(); function i am manually toggling the elements based on the resulting string. but how can i select an element based on a variable. essentially the variable newSpecial is e

[jQuery] Re: quick question, selecting dynamic elements

2007-11-29 Thread Josh V
wow silly me, after all I am trying to target the ID, # would be useful. :p ill give that a try tomorrow. On Nov 29, 7:22 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > On Nov 29, 2007, at 6:04 PM, Josh V wrote: > > > > > > > on click i am storing the ID of an the i clicked. > > > i am then rep

[jQuery] Re: quick question, selecting dynamic elements

2007-11-29 Thread Karl Swedberg
On Nov 29, 2007, at 6:04 PM, Josh V wrote: on click i am storing the ID of an the i clicked. i am then replacing characters in that string to get the desired resulting string. i am then trying to toggle a div whos ID is the resulting string. heres what i got. $("ul#specialsNav