Re: [jQuery] PNGs in IE
hi klaus, - first it seemed to work, now it doesn't. do you or anyone know or understand why the following freezes internet explorer (as also noted by SNF)? your tipp on the url below works fine, but the bit you posted about making this work for background images as well makes IE6 freeze. any help appreciated. cheers, s this freezes IE6: * html .png { behaviour: expression( this.runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.runtimeStyle.backgroundImage + '", sizingMethod="image")', this.runtimeStyle.backgroundImage = 'none' ); } > It's not jQuery, but a CSS "pure" solution I made (well, it relies on > Dynamic Properties, e.g. JavaScript, but you put it into a style sheet): > http://www.stilbuero.de/2006/03/15/png-alpha-transparency-fast-and-easy/ > > I could make a plugin out of that as well maybe. This works for pngs > included via img element. If you follow the comments there's a solution > for CSS background images as well... > > > -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] PNGs in IE
HI There are 2 plugins that fix this problem. Just search the Joomla extensions for them. Janet - Original Message - From: "schnuck" <[EMAIL PROTECTED]> To: Sent: Thursday, February 22, 2007 6:19 AM Subject: [jQuery] PNGs in IE > > anyone knows of a jquery plugin that fixes PNG transparency in IE 5.5, 6? > or any ideas please? > > tia, > > s > > -- > View this message in context: > http://www.nabble.com/PNGs-in-IE-tf3272202.html#a9098109 > Sent from the JQuery mailing list archive at Nabble.com. > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] PNGs in IE
thanks to all who replied that quickly. a combination of 2 techniques finally (!) solved my problem (though css only solutions). however any news on a nice plugin that makes life even easier, please keep us posted. the below might be not optimal, but it fixes background images as well as inline while keeping them clickable and by putting sizingmethod to scale rather than image it even keeps the intended image dimension fixed. i am working on a site that uses many effects and this doesnt seem to mess around with any of them. thanks again, s Sam Collett wrote: > > On 22/02/07, schnuck <[EMAIL PROTECTED]> wrote: >> >> anyone knows of a jquery plugin that fixes PNG transparency in IE 5.5, 6? >> or any ideas please? >> >> tia, >> >> s >> >> -- > > There is a plugin here: > http://nemoweb.com.au/jquery/IEPNGHack/take3.html > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/PNGs-in-IE-tf3272202.html#a9099113 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] PNGs in IE
On 22/02/07, schnuck <[EMAIL PROTECTED]> wrote: > > anyone knows of a jquery plugin that fixes PNG transparency in IE 5.5, 6? > or any ideas please? > > tia, > > s > > -- There is a plugin here: http://nemoweb.com.au/jquery/IEPNGHack/take3.html ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] PNGs in IE
schnuck schreef: > anyone knows of a jquery plugin that fixes PNG transparency in IE 5.5, 6? > or any ideas please? > It's not a plugin, but i use this: $(document).ready(function(){ if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer") { fnLoadPngs(); } }) /** * Make images in IE6/IE5.5 transparent.. */ function fnLoadPngs() { var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5); for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) { if (itsAllGood && img.src.match(/\.png$/i) != null) { var src = img.src; img.style.width = img.width + "px"; img.style.height = img.height + "px"; img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')" img.src = "img/x.gif"; } img.style.visibility = "visible"; } } (make sure that img/x.gif is available: it's just a 1x1 transparent pixel gif) This can undoubtedly be cleaned up, but i never bothered.. (if it ain't broke, that sort of thing) It's basically a quick hack to use an old-school PNG-fix script in my jquery sites.. The main advantage that i wanted to overcome is the gray flicker.. Because it's triggered in $(document).ready it shows the pngs correctly much quicker than when using onload. Best regards, Bob. > -- Bob den Otter - [EMAIL PROTECTED] Two Kings - www.twokings.nl - 070 345 76 28 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] PNGs in IE
I just so happened to write one tonight :-) Not completely finished (any improvements let me know, especially about the $(this) parts) but here it is: (function($) { $.fn.fixPNG = function() { if($.browser.msie) { var agent = navigator.userAgent.toLowerCase(); if(parseFloat(agent.substr(agent.indexOf('msie') + 5, 3)) > 6) { return(false); } } else { return(false); } $(this).each(function() { if($(this).attr('src').indexOf('.png') != -1) { var t = $(this); var imgSrc = $(t).attr('src'); var w = $(t).attr('width') + 'px'; var h = $(t).attr('height') + 'px'; $(t).css({filter : "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + imgSrc + "', sizingMethod='scale')"}).attr({src : '/images/spacer.gif', width: w, height: h}) } }); }; })(jQuery); $(function() { $('img').fixPNG(); }); schnuck wrote: > anyone knows of a jquery plugin that fixes PNG transparency in IE 5.5, 6? > or any ideas please? > > tia, > > s > > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] PNGs in IE
schnuck schrieb: > anyone knows of a jquery plugin that fixes PNG transparency in IE 5.5, 6? > or any ideas please? > > tia, > > s > It's not jQuery, but a CSS "pure" solution I made (well, it relies on Dynamic Properties, e.g. JavaScript, but you put it into a style sheet): http://www.stilbuero.de/2006/03/15/png-alpha-transparency-fast-and-easy/ I could make a plugin out of that as well maybe. This works for pngs included via img element. If you follow the comments there's a solution for CSS background images as well... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] PNGs in IE
One option: http://www.stilbuero.de/2006/03/15/png-alpha-transparency-fast-and-easy/ Chris ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] PNGs in IE
anyone knows of a jquery plugin that fixes PNG transparency in IE 5.5, 6? or any ideas please? tia, s -- View this message in context: http://www.nabble.com/PNGs-in-IE-tf3272202.html#a9098109 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/