apply script to all elements
i need to show all images, which are in the div
with class="deep"
.
w开发者_如何学Pythonhen i try the following script it doesn't work.
$(".deep img").css("visibility", "visible");
i can solve the problem using something like .each
, but maybe there is something more simple?
Thanks
If the images are visibility: hidden
this will work. However, more often they're display:none
, in which case do this:
$(".deep img").show();
What is the state of the images before you attempt the above line? Are they display:none?
Try this. $('.deep').find('img').css("visibility", "visible");
精彩评论