Reputation: 509
I'd like to be able to have an array full of jQuery selectors as such (an array of class names). This is what I'm doing at the moment though it's not functioning:
var array = [$('.one'),$('.two')];
array[0].find('.box-text').attr('src',"myImage.png");
What's wrong?
Upvotes: 0
Views: 1397
Reputation: 2557
is it ok for you to do something like
var array = ['.one','.two'];
$(array[0]).hide()
Upvotes: 5