<div class="moviesRotator" id="moviesRotator">
<a>
<img width="431" height="348" alt="" src="img_url1"/>
</a>
<a>
<img width="431" height="348" alt="" src="img_url2"/>
</a>
<a>
<img width="431" height="348" alt="" src="img_url3"/>
</a>
</div>
I want to make the image wider, and bigger dynamically. So is it possible to do this?
$('.moviesRotat0r.a.img').attr('width', 620)
$('.moviesRotat0r.a.img').attr('height', 380)
So is it possible to iterate through all the tags within the and change the height and width that way?
What is the correct syntax here?
Please let me know.
many thanks.
You can do this ... Make sure the source of images are large enough to avoid enlargement artefacts ...
$('.moviesRotator img').attr('width', 620).attr('height', 380);
Use the container's id instead if available (search is faster)
$('#moviesRotator img').attr('width', 620).attr('height', 380);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With