How do I change the height and width of an image in and unordered list with jQuery
<ul id="files">
<li><img src="1.png" /></li>
<li><img src="2.png" /></li>
<li><img src="3.png" />/li>
</ul>
My css :
ul#files li img
{
width: 100px;
height:100px;
}
I’ve tried this :
$('ul > li > img').width('300');
$('ul > li > img').height('300');
If you pass jQuery a number for a width or height, it assumes the value is in pixels, but if you pass it a string, it demands a valid CSS unit. You can either say
or