thanks for million dollar feedback Klaus :)
I've used Christof's code to come up with cleaner solution
http://www.nemoweb.com.au/jquery/IEPNGHack/take3.html
Klaus Hartl wrote:
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
discuss@jquery.com
http://jquery.com/discuss/
--
Cheers,
Kush
Sensory Networks
Web Applications Developer
Direct: + 61 2 8302 2745
Phone: + 61 2 8302 2700
Fax: + 61 2 9475 0316
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/