help getting the #id value as a var to use for dynamicly
Hi I have a working code in a page that looks for the #id of the link clicked and then slideDown the div with the same #id but at the moment I need to hard code the #id
-
$(".choice #1").click(
$("#display_content div")hide();
$("#display_content #1")slideDown();
)
The code repeats for #2 and so on and so on. The above code is not written correctly because I don’t have access to the file I was working on at the moment so I have rewritten it from memory.
but how i see it should work would be something like
var id = clickedlink#id
-
$(".choice"+id).click(
$("#display_content div")hide();
$("#display_content"+id)slideDown();
)
does that sound right because when i do it doesnt seem to work anyway i try it.