Reputation: 65
I'm trying to convert the following CSS
img.rsImg.rsMainSlideImage {
display: inline-block;
}
Into Javascript
$('img').closest('.rsImg').closest('.rsMainSlideImage').css('display', 'inline-block');
And something I'm doing seems to be a bit off. I used the same script with a single div and it worked, but this is a bit nested.
Upvotes: 0
Views: 52
Reputation: 138257
What about
$("img.rsImg.rsMainSlideImage").css("display", "inline-block");
Upvotes: 4