Created
November 15, 2012 17:39
-
-
Save davidrhoden/4080006 to your computer and use it in GitHub Desktop.
why doesn't the code in $.each run?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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