I need to set specific width and height of image (in css), with jquery, but only for first image in one div. Is it posibble?
#your_div is refers to div that contains image, may be you've something else.
$('#your_div img:first').css({
height: 200, // also use '200px' or something other
width: 200 // '200px' or something other
});
alternative of img:first is img:eq(0).
Read about jQuery :first and :eq()
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