Skip to content

Instantly share code, notes, and snippets.

@dqminh
Created May 10, 2011 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dqminh/964135 to your computer and use it in GitHub Desktop.
Save dqminh/964135 to your computer and use it in GitHub Desktop.
fetch_image.js
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