Closed nilssolanki closed 7 years ago
You use Modernizr in your code to determine whether css transforms are supported. But if I use a custom Modernizr build without csstransforms, then your code fails and uses the left positioning fallback.
left
Instead of doing the following (https://github.com/briangonzalez/jquery.pep.js/blob/master/src/jquery.pep.js#L963):
if ( !this.options.useCSSTranslation || ( typeof(Modernizr) !== "undefined" && !Modernizr.csstransforms)){
You could check if Modernizr has a property csstransforms in the first place before checking the value:
csstransforms
if ( !this.options.useCSSTranslation || ( typeof(Modernizr) !== "undefined" && Modernizr.hasOwnPropetry('csstransforms') && !Modernizr.csstransforms)){
Or just do a strict check:
if ( !this.options.useCSSTranslation || ( typeof(Modernizr) !== "undefined" && Modernizr.csstransforms === false)){
You use Modernizr in your code to determine whether css transforms are supported. But if I use a custom Modernizr build without csstransforms, then your code fails and uses the
left
positioning fallback.Instead of doing the following (https://github.com/briangonzalez/jquery.pep.js/blob/master/src/jquery.pep.js#L963):
You could check if Modernizr has a property
csstransforms
in the first place before checking the value:Or just do a strict check: