Skip to content

Instantly share code, notes, and snippets.

@davidrhoden
Created November 15, 2012 17:39
Show Gist options
  • Save davidrhoden/4080006 to your computer and use it in GitHub Desktop.
Save davidrhoden/4080006 to your computer and use it in GitHub Desktop.
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