javascript - Set image width and height with jquery -


i upload image ck editor. when select , upload file, editor automatic write image width , height.

if dont write in 2 field manualy 100% , 100%, how can edit jquery? code, writes width , height 100%, ck editor add these features style attr.

$('div.content img').attr('width', '100%'); $('div.content img').attr('height', '100%'); 

how can modify img-s style attr jquery, , set width , height 100%?

thank you!

you can use jquery's css -

$('div.content img').css({    'width' : '100%',    'height' : '100%' }); 

http://api.jquery.com/css/


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -