Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
why doesn't the code in $.each run?
$(document).ready(function(){
var width = 740;
console.log(width);
$.each($('.overview img'), function(i, img) {
width += $(img).width();
console.log($('.overview img'), width);
});
$('.overview').width(width);
console.log(width);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment