diff --git a/CHANGELOG.md b/CHANGELOG.md index 9427bcc..aef2f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 4.6.4 + +* IE8 fix +* Setting breakpoint on document no longer finds children images + # 4.6.3 * Fixed broken qunit testing diff --git a/bower.json b/bower.json index 6eb6a2d..bbcb1c3 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "breakpoint", - "version": "4.6.3", + "version": "4.6.4", "description": "Breakpoint is a column based media query generator and responsive image framework.", "author": "Les James", "homepage": "https://github.com/lesjames/breakpoint", diff --git a/jquery.breakpoint.js b/jquery.breakpoint.js index 343fa38..ccd0569 100644 --- a/jquery.breakpoint.js +++ b/jquery.breakpoint.js @@ -1,5 +1,5 @@ /*! - * jQuery Breakpoint plugin v4.6.2 + * jQuery Breakpoint plugin v4.6.4 * http://github.com/lesjames/breakpoint * * MIT License @@ -47,7 +47,7 @@ } else { // older browsers need some help - window.getComputedStyle = function(el) { + var getComputedFallback = function(el) { this.el = el; this.getPropertyValue = function(prop) { var re = /(\-([a-z]){1})/g; @@ -62,8 +62,8 @@ }; // fallback label is added as a font-family to the head, thanks Jeremy Keith - style = window.getComputedStyle(document.getElementsByTagName('head')[0], ''); - style = removeQuotes(style.getPropertyValue('font-family')); + style = getComputedFallback(document.getElementsByTagName('head')[0]); + style = style.getPropertyValue('font-family'); } @@ -218,8 +218,12 @@ $.fn.breakpoint = function (options, callback) { - // reduce selection to only images - var $images = this.find('img').add( this.filter('img') ); + var $images = []; + + if (this[0] !== document) { + // reduce selection to only images + $images = this.find('img').add( this.filter('img') ); + } // create an instance and pass it selected images var breakpointImages = new BreakpointImages( $images );