Signin  Pricing  Examples  Support

Libraries > ds-sleight.js

ds-sleight.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE https://us.mih-jeans.com/js/lib/ds-sleight.js

Function Explorer



Libraries on us.mih-jeans.com


jquery.js

modernizr.js

ccard.js

ds-sleight.js

cookies.js

translate.js

script.js

prototype.js

validation.js

builder.js

controls.js

dragdrop.js

effects.js

scriptaculous.js

slider.js

form.js

js.js

menu.js

ie6.js

tagmanager.js

jquery.fancybox.pack.js

jquery.easing.1.3.js

jquery.fullPage.min.js

jquery.onscreen.min.js

jquery.sticky.js

jquery.unveil.min.js

jquery.vide.min.js

jquery.waitforimages.min.js

logicspot.js

slick.min.js



Explore More


css-transition.js

functions.js

html5.js

jquery.fancybox.js

ds-sleight.js
				
// Universal transparent-PNG enabler for MSIE/Win 5.5+
// http://dsandler.org
// From original code: http://www.youngpup.net/?request=/snippets/sleight.xml
// and background-image code: http://www.allinthehead.com/retro/69
// also:
//  * use sizingMethod=crop to avoid scaling PNGs (who would do such a thing?)
//  * only do this once, to make it compatible with CSS rollovers

if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	window.attachEvent("onload", enableAlphaImages);
}

function enableAlphaImages(){
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
	if (itsAllGood) {
		for (var i=0; i<document.all.length; i++){
			var obj = document.all[i];
			var bg = obj.currentStyle.backgroundImage;
			var img = document.images[i];
			if (bg && bg.match(/\.png/i) != null) {
				var img = bg.substring(5,bg.length-2);
				var offset = obj.style["background-position"];
				obj.style.filter =
				"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img+"', sizingMethod='crop')";
				obj.style.backgroundImage = "url('"+BLANK_IMG+"')";
				obj.style["background-position"] = offset; // reapply
			} else if (img && 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='crop')"
				img.src = BLANK_IMG;
			}
		}
	}
}


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z