Could someone explain what’s wrong with this snippet?
I’m looking to get the width of all images in a div.
var totalwidth = $("#imagecontainer > img").width();
$("#imagecontainer").width(totalwidth);
sorry, thought it was just a syntax problem
(un)working example here:
http://jsfiddle.net/TZ2nT/3/
the container div does not accept the value for some reason?
did u tried this
Edit :
Test it here http://jsbin.com/ayira3