Category : javascript


Variable holds last value when added to multiple event listeners

Posted on 2009-05-01 by James

This was a problem I faced when I had to add event listeners to elements created in a loop such that the elements should alert the value of var i in the event onClick.

read full article

 

Preload images using javascript

Posted on 2009-05-04 by James

With Internet Explorer and other browsers there have been issues known when trying to load images
after the page is loaded. Let's say you try to load a new image using a onmouseover event,
older Internet Explorer versions will not load the new picture at all.

read full article

 

Javascript prevent event bubbling parent child when fired

Posted on 2009-07-15 by James

Javascript can be a braincracker at some times. As it happened to be so for me trying to make bubbling stop towards a parent element when firing an event from a child element.

read full article