Kush Murod schrieb:
> Hi guys,
>
> I've wrote very simple JQuery IE PNG hack plugin.
> Would like to know your professional opinion, to make it better
>
> http://nemoweb.com.au/jquery/IEPNGHack/
>
> Cheers,
> Kush
Instead of creating a $(this) object 9 (!) times think about creating it
once and store it in a variable.
In addition, you're using "jquery.fn.foo". This pattern is usually
considered to have the function chainable.
$('img').chainable().foo().bar();
Thus instead of "this.each..." you would have to use "return this each...".
In this line:
hack += jq.attr('id') ? " id=\"" + jq.attr('id') + "\"" : "";
you're duplicating an id, which is supposed to be unique in a document
and if you need valid HTML.
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/