parallax_content
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -5,4 +5,23 @@ 'use strict'; | ||
(function ($) { | ||
/* | ||
Parallax Color Bars | ||
Author: lemehovskiy | ||
Website: https://github.com/lemehovskiy | ||
*/ | ||
;(function (factory) { | ||
'use strict'; | ||
if (typeof define === 'function' && define.amd) { | ||
define(['jquery'], factory); | ||
} else if (typeof exports !== 'undefined') { | ||
module.exports = factory(require('jquery')); | ||
} else { | ||
factory(jQuery); | ||
} | ||
})(function ($) { | ||
$.fn.parallaxContent = function (method) { | ||
@@ -92,2 +111,2 @@ | ||
}; | ||
})(jQuery); | ||
}); |
@@ -1,2 +0,2 @@ | ||
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(o){o.fn.parallaxContent=function(t){var n={init:function(t){var n=o.extend({duration:1.5,shift:10},t),e=0,i=0,r=0;o(window).on("scroll load",function(){e=o(window).scrollTop(),i=o(window).height(),r=e+i}),this.each(function(){var t=o(this),e=t.outerHeight(),a=0,l=0,f=0,s=0,c=t.data("parallax-content"),p=n.duration,u=n.shift;void 0!=c&&(c.hasOwnProperty("duration")&&(p=c.duration),c.hasOwnProperty("shift")&&(u=c.shift)),o(window).on("load resize",function(){f=t.offset(),a=f.top,l=a+i,s=l-a}),o(window).on("scroll resize load",function(){if(r>a&&r<l+e){t.addClass("active");var o=r-f.top-.5*s,n=o/(s/100)*2,i=u/100*n;TweenLite.to(t,p,{y:i+"px"})}else t.removeClass("active")})})}};return n[t]?n[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!==(void 0===t?"undefined":_typeof(t))&&t?void o.error("There is no method with the name "+t+", for jQuery.parallaxContent"):n.init.apply(this,arguments)}}(jQuery); | ||
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(o){"function"==typeof define&&define.amd?define(["jquery"],o):"undefined"!=typeof exports?module.exports=o(require("jquery")):o(jQuery)}(function(o){o.fn.parallaxContent=function(t){var e={init:function(t){var e=o.extend({duration:1.5,shift:10},t),n=0,i=0,r=0;o(window).on("scroll load",function(){n=o(window).scrollTop(),i=o(window).height(),r=n+i}),this.each(function(){var t=o(this),n=t.outerHeight(),a=0,f=0,l=0,u=0,s=t.data("parallax-content"),d=e.duration,p=e.shift;void 0!=s&&(s.hasOwnProperty("duration")&&(d=s.duration),s.hasOwnProperty("shift")&&(p=s.shift)),o(window).on("load resize",function(){l=t.offset(),a=l.top,f=a+i,u=f-a}),o(window).on("scroll resize load",function(){if(r>a&&r<f+n){t.addClass("active");var o=r-l.top-.5*u,e=o/(u/100)*2,i=p/100*e;TweenLite.to(t,d,{y:i+"px"})}else t.removeClass("active")})})}};return e[t]?e[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!==(void 0===t?"undefined":_typeof(t))&&t?void o.error("There is no method with the name "+t+", for jQuery.parallaxContent"):e.init.apply(this,arguments)}}); | ||
//# sourceMappingURL=parallaxContent.min.js.map |
{ | ||
"name": "parallax_content", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "parallax content", | ||
"main": "index.js", | ||
"main": "build/parallaxContent.js", | ||
"dependencies": { | ||
@@ -7,0 +7,0 @@ "gsap": "^1.20.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1298061
777
4