Jenny Mok Jenny Mok - 4 months ago 49
CSS Question

Appended but style not updating

var dom = '<div data-id="'+id+'" class="box box_album_item"><div class="album_item" style="background: url('+img_src+') no-repeat center center; background-size: cover; height="'+ $('#album_item .album_item:first').outerWidth() +'px"></div></div>';


everything worked, I'm able to see the height in my dom,

enter image description here

but the height is not applied?


you have mention "height=", you are giving a style not attribute use "height:" instead. var dom = ' ';