Browsing articles from "November, 2011"
Nov
9
9
Working with jQuery load() function on images in Internet Explorer 8 and below
One big problem with using load() on images is that it just does not work at all on ie. Now there is a lot of solutions proposed to counter this problem, however most of them are irritating.
Why IE handle load() this way
Simple, IE already cached your image, so it does not need to load it back The 2 most know solution to this are one, adding a random string at the end of the image url, like this:
-
myImge = $("<img />")
-
.attr("src",anyDynamicSource+ "?" + new Date().getTime());
The other solution is to check the height property since if it’s not zero, the image is already loaded:
-
$('img').each(function() {
-
if ($(this).height() > 0) {
-
our callback
-
} else {
-
$(this).load(function() {
-
our callback
-
});
-
}
-
});
Well these 2…
Articles
Some Tweets
- Just got my ass handed to me by CKeditor, again..
- mac osx appstore rules are insane
- Kind of surprise there is no article about listing positions in the chrome web store
- Using CSS without HTML http://t.co/DitNwX85
- Thanks to @nextmontreal and @byosko for the nice article on @weddingdeck
- Google using its android app Kill Switch http://t.co/HDQT5NCq



