Kush Murod schrieb:

Hi guys,

Every time I had to use png image in IE lt 6 I had to look up old emails.
So I decided to put together initial documentation, example and plugin for everybody to use, including for myself.
So together we could make it even better, your feedback is appreciated.

http://khurshid.com/jquery/iepnghack/
Like bgiframe a must-have. Thanks for taking up the task to plugify it.

You may want to add code to fix png-background-images, maybe just take the methods from my tooltip plugin and document them: http://dev.jquery.com/browser/trunk/plugins/tooltip/jquery.tooltip.js?format=txt (scroll down to 'fixPNG:')

The browser version check can be simplified. This works quite well:

IE = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent)

And jQuery 1.1.3 provides a version flag in it's core, allowing both of us to remove that stuff once 1.1.3 is out. Depending on the browser flag you can assign an empty function that just returns this. Eg.:

$.fn.fixPng = ieLt7 ? function() {
        return this.each(...);
} : function() { return this; }

Not breaking the chain allows you to combine it with other plugins, eg. $(...).fixpng().bgiframe()

--
Jörn Zaefferer

http://bassistance.de

Reply via email to