Created
May 10, 2011 09:02
-
-
Save dqminh/964135 to your computer and use it in GitHub Desktop.
fetch_image.js
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
var janitor = new Image(), | |
info = {}, | |
test = $("#test"), | |
images = []; | |
$.get("somewhere_that_fetch_the_page").complete(function (data) { | |
var tmpImages = $(data.responseText).find("img"); | |
tmpImages.each(function (key, img) { | |
var src = (img.getAttribute ? img.getAttribute("src") : false) || img.src; | |
janitor.src = src; | |
console.log(src, janitor.width, janitor.height); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment