Created
December 11, 2011 22:00
-
-
Save joshellington/1463009 to your computer and use it in GitHub Desktop.
This file contains 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
function build() { | |
var images = []; | |
$('.image').each(function() { | |
var position = $(this).data('isotope-item-position'), | |
img = $(this).find('img'), | |
src = $(img).attr('src'), | |
w = $(img).width(), | |
h = $(img).height(); | |
var image = { | |
'src': src, | |
'x': position.x, | |
'y': position.y, | |
'width': w, | |
'height': h | |
}; | |
images.push(image); | |
}); | |
$.post('/build/', {'images': images}, function(d) { | |
log('-----------') | |
log('build results'); | |
log(d); | |
log('-----------') | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment