html - Image onLoad problem in IE -


in ie not scale down huge images. in fact, scales not all. scale them down setting small width , height attributes. how fix it?

i follows:

var $image = $('<img/>'); $image.attr('src', 'http://example.com/img.jpeg'); $image.load(function () {   this.width = this.height = 100; }); 

something that. not images scaled down. and, every time reload page different images scaled down.

i have found out matter is. please refer img onload doesn't work in ie7

ie 6&7 fire "load" if have image server -- don't if image in local cache., jeremy wadhams wrote.

if define width , height in html element, should work. in css, ie6 isn't standards compliant , results may vary.

for best practices, shouldn't re-size images in browser, slows down , causes pixelation. make copy of images that's size want, , link these images full-size images, if that's appropriate.

once you've done that, keep images away me, thankyouverymuch.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -