diff --git a/bonzo.js b/bonzo.js index 0369f57..b890c89 100644 --- a/bonzo.js +++ b/bonzo.js @@ -768,7 +768,7 @@ v = iter[k]; // change "5" to "5px" - unless you're line-height, which is allowed (p = styleProperty(k)) && digit.test(v) && !(p in unitless) && (v += px) - el.style[p] = setter(el, v) + try { el.style[p] = setter(el, v) } catch(e) {} } } } @@ -1124,4 +1124,4 @@ } return bonzo -}, this); // the only line we care about using a semi-colon. placed here for concatenation tools \ No newline at end of file +}, this); // the only line we care about using a semi-colon. placed here for concatenation tools diff --git a/bonzo.min.js b/bonzo.min.js index 5b01ae4..ee6a2b5 100644 --- a/bonzo.min.js +++ b/bonzo.min.js @@ -3,4 +3,4 @@ * https://github.com/ded/bonzo * License MIT */ -(function(e,t,n){typeof module!="undefined"&&module.exports?module.exports=t():typeof n["define"]=="function"&&n.define.amd?define(e,t):n[e]=t()})("bonzo",function(){function M(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")}function _(e,t,n,r){var i,s=0,o=e.length;for(;s0?J(o,r):r)},null,r)},this,r),o.length=s,_(u,function(e){o[--s]=e},null,!r),o}function W(e,t,n){var r=Y(e),i=r.css("position"),s=r.offset(),o="relative",u=i==o,a=[parseInt(r.css("left"),10),parseInt(r.css("top"),10)];i=="static"&&(r.css("position",o),i=o),isNaN(a[0])&&(a[0]=u?0:e.offsetLeft),isNaN(a[1])&&(a[1]=u?0:e.offsetTop),t!=null&&(e.style.left=t-s.left+a[0]+E),n!=null&&(e.style.top=n-s.top+a[1]+E)}function X(e,t){return typeof t=="function"?t(e):t}function V(e){this.length=0;if(e){e=typeof e!="string"&&!e.nodeType&&typeof e.length!="undefined"?e:[e],this.length=e.length;for(var t=0;t","",1],a=["","
",3],f=["",1],l=["_","",0,1],c={thead:u,tbody:u,tfoot:u,colgroup:u,caption:u,tr:["","
",2],th:a,td:a,col:["","
",2],fieldset:["
","
",1],legend:["
","
",2],option:f,optgroup:f,script:l,style:l,link:l,param:l,base:l},h=/^(checked|selected)$/,p=/msie/i.test(navigator.userAgent),d,v,m,g={},y=0,b=/^-?[\d\.]+$/,w=/^data-(.+)$/,E="px",S="setAttribute",x="getAttribute",T="getElementsByTagName",N=function(){var e=t.createElement("p");return e.innerHTML='x
',{hrefExtended:e[T]("a")[0][x]("href")!="#x",autoTbody:e[T]("tbody").length!==0,computedStyle:t.defaultView&&t.defaultView.getComputedStyle,cssFloat:e[T]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var t=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],n;for(n=0;n]+)/.exec(e),i=t.createElement("div"),s=[],o=n?c[n[1].toLowerCase()]:null,u=o?o[2]+1:1,a=o&&o[3],f=r,l=N.autoTbody&&o&&o[0]==""&&!/0?J(o,r):r)},null,r)},this,r),o.length=s,_(u,function(e){o[--s]=e},null,!r),o}function W(e,t,n){var r=Y(e),i=r.css("position"),s=r.offset(),o="relative",u=i==o,a=[parseInt(r.css("left"),10),parseInt(r.css("top"),10)];i=="static"&&(r.css("position",o),i=o),isNaN(a[0])&&(a[0]=u?0:e.offsetLeft),isNaN(a[1])&&(a[1]=u?0:e.offsetTop),t!=null&&(e.style.left=t-s.left+a[0]+E),n!=null&&(e.style.top=n-s.top+a[1]+E)}function X(e,t){return typeof t=="function"?t(e):t}function V(e){this.length=0;if(e){e=typeof e!="string"&&!e.nodeType&&typeof e.length!="undefined"?e:[e],this.length=e.length;for(var t=0;t","
",1],a=["","
",3],f=["",1],l=["_","",0,1],c={thead:u,tbody:u,tfoot:u,colgroup:u,caption:u,tr:["","
",2],th:a,td:a,col:["","
",2],fieldset:["
","
",1],legend:["
","
",2],option:f,optgroup:f,script:l,style:l,link:l,param:l,base:l},h=/^(checked|selected)$/,p=/msie/i.test(navigator.userAgent),d,v,m,g={},y=0,b=/^-?[\d\.]+$/,w=/^data-(.+)$/,E="px",S="setAttribute",x="getAttribute",T="getElementsByTagName",N=function(){var e=t.createElement("p");return e.innerHTML='x
',{hrefExtended:e[T]("a")[0][x]("href")!="#x",autoTbody:e[T]("tbody").length!==0,computedStyle:t.defaultView&&t.defaultView.getComputedStyle,cssFloat:e[T]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var t=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],n;for(n=0;n]+)/.exec(e),i=t.createElement("div"),s=[],o=n?c[n[1].toLowerCase()]:null,u=o?o[2]+1:1,a=o&&o[3],f=r,l=N.autoTbody&&o&&o[0]==""&&!/