Posts Tagged “IE”

Simple IE Detection and CSS Selector Injection into HTML Tag

Posted on March 23rd, 2016 by webninjataylor

// IE Detection (for alternative since icon font is being blocked) if((navigator.appVersion.indexOf(‘MSIE’)!== -1)||(navigator.appVersion.indexOf(‘Windows’)!== -1)){ rm.isIE = true; $(‘html’).addClass(‘ie’); }

Common IE Bugs

Posted on June 23rd, 2014 by webninjataylor

Use _.each(myArray,function) in place of .forEach() myRegex.test(myString) in place of .indexOf() var filter = /0{3}/; if(filter.test(orgInfo.get(‘payeeIdentifier’)) !== false){ … } Use envt.target in place of evnt.currentTarget IE doesn’t understand .trim() method, so add this… /******** FIX FOR IE TO USE TRIM() METHOD ********/ if(typeof String.prototype.trim !== ‘function’){ String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, ”); } } IE’s […]

Count CSS Rules in Console

Posted on July 11th, 2013 by webninjataylor

In your console, type… var sheets = document.styleSheets; var rules = 0; for(i=0; i < sheets.length; i++){ if(sheets[i].cssRules !== null){ rules = rules + sheets[i].cssRules.length; } } console.log(‘Rules = ‘+rules); IE limits rules to 4,095.

CSS IE Hack

Posted on May 29th, 2013 by webninjataylor

top: 17px; /* For Non-IE */ top: 8px\9; /* For IE */

CSS3 Transitions Gotchas

Posted on May 8th, 2013 by webninjataylor

Be very careful when using transition-property: all. You will get TransitionEnd events for properties that you didn’t expect to ever transition Be careful when using shorthand properties, because the number of triggered events varies between browsers Opera and IE don’t trigger events when a negative delay cancels out the duration WebKit has real issues with the priority of properties such […]

IE8 HTML5 Shiv

Posted on April 17th, 2013 by webninjataylor

If you’re not using Modernizr to pull in the shiv, just add a call to the shiv directly in the head of the HTML… <!–[if lt IE 9]><script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script><![endif]–>