Return to Snippet

Revision: 64088
at July 3, 2013 21:02 by quantal


Initial Code
//IE VERSION CONTROL

function getInternetExplorerVersion() {
	var rv = -1; // Return value assumes failure.
	if (navigator.appName == 'Microsoft Internet Explorer') {
		var ua = navigator.userAgent;
		var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		if (re.exec(ua) != null) rv = parseFloat(RegExp.$1);
	}
	return rv;
}

function checkVersion() {
	var msg = "Internet Explorer";
	var ver = getInternetExplorerVersion();

	if (ver > -1) {
		$("html").addClass("ie").addClass("ie" + ver); //add version Class
		/*	
		 if ( ver >= 10.0 ) 
		 msg = "NEW browser."
		 else
		 msg = "Old browser.";*/
	}
}
checkVersion();

Initial URL

                                

Initial Description
// adding ie version class on html tag

Initial Title
internet Explorer Versiyon Control

Initial Tags

                                

Initial Language
JavaScript