selector with variable
selector with variable
Is it possible to use a variable in a selector?
So instead of this:
$("#slider img").hide();
I want something like this
var wrapper = "#slider";
$(wrapper + " img").hide();
But this is just giving me this error:
uncaught exception: Syntax error, unrecognized expression: [object Object]
I hope somebody can help me with this.
Topic Participants
woutr
charlietfl
craigcosmo