belatedPNG / IMG nodes / Javascript event handling

July 2, 2009

I have noted in the past in known issues that, in order to not have to use a pixel GIF (a practice I find annoying), I have to set IMG nodes to visibility:hidden.  This prevents any attached Javascript event handling from functioning as expected, because you can no longer, say, click on the IMG anymore.

Over email, I’ve answered inquiries about this with nothing better than using a pixel GIF workaround and moving the PNG image visibility to the parent as a background image.  Lame.

I’ve decided that 0.0.9a will simply copy all events bound to any fixed IMG nodes to the resulting visible VML, and will modify them slightly so that they fire in the scope of the IMG node as intended.  I estimate that will get around that catch-22.   One can hope, anyway.

2 Responses to “belatedPNG / IMG nodes / Javascript event handling”

  1. Сергей Says:

    Hey Drew, did anyone mailed you that problem, that starting from v.0.0.7 you can`t set the same class to all elements, because it will work only with the first one?

  2. johnbl4ck Says:

    first of all, thanks for this brilliant technique it works like a charm but i found some issue:

    after applying your fix text nodes with class .red become corrupted:

    http://img17.imageshack.us/img17/2039/strangeddbelated.png

    css goes like:

    strong.red {
    color: #d30202;
    font-size: 18px;
    }

    currently i have no time to investigate further but when i renamed the class to .redd everything display correctly.

    belatedPNG ver. 0.0.8

    anyway huge thanks for your outstanding work!


Leave a Reply