Skip to content

Commit

Permalink
added Get Computed Style fix for IE
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiemachado committed Jul 17, 2012
1 parent a21e7b7 commit dff36af
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions library/js/scripts.js
Expand Up @@ -9,6 +9,24 @@ slow the page load.
*/

// IE8 ployfill for GetComputed Style (for Responsive Script below)
if (!window.getComputedStyle) {
window.getComputedStyle = function(el, pseudo) {
this.el = el;
this.getPropertyValue = function(prop) {
var re = /(\-([a-z]){1})/g;
if (prop == 'float') prop = 'styleFloat';
if (re.test(prop)) {
prop = prop.replace(re, function () {
return arguments[2].toUpperCase();
});
}
return el.currentStyle[prop] ? el.currentStyle[prop] : null;
}
return this;
}
}

// as the page loads, call these scripts
jQuery(document).ready(function($) {

Expand Down

0 comments on commit dff36af

Please sign in to comment.