Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
81
rated 0 times [  87] [ 6]  / answers: 1 / hits: 35329  / 14 Years ago, thu, january 27, 2011, 12:00:00

currently I am working on an image slider with jquery. I have downloaded the code from the net. My code demo is here.



My question is: how can I remove the height and width attaching dynamically to image tag as inline style?



Thanks.


More From » jquery

 Answers
7

Try to use this code:



$('your-image').css({ 
width: '',
height: ''
});


If you want to set the original image dimensions try this:



$('your-image').css({ 
width: 'auto',
height: 'auto'
});

[#94035] Tuesday, January 25, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sienad

Total Points: 208
Total Questions: 100
Total Answers: 77

Location: Taiwan
Member since Mon, Sep 6, 2021
3 Years ago
;