title: Get href,src,width,height of image using jQuery
body: <p>I want to get the href, src, width, height of all images on a page.  The jQuery code is </p>
  
  <pre><code>$('img:regex(data:extension, jpg)').each(function() {
  
  
  var imgsrc = $(this).attr('href'); 
  
  //$(this).attr('width') =0;                                     
  
  var newImg = new Image();
  newImg.src = imgsrc;    
  var width = newImg.width;
  //width is 0;
  
  
  });
  </code></pre>
  
  <p>Not sure what is wrong, any ideas?</p>
  
  <p>Thanks
  Jean</p>