{"_id":"jquery-parallax.js","_rev":"11-12cec9ed61781073f7e81cb1f89baea0","name":"jquery-parallax.js","description":"Simple parallax scrolling effect inspired by spotify.com implemented as a jQuery plugin","dist-tags":{"latest":"1.5.0"},"versions":{"1.4.2":{"name":"jquery-parallax.js","version":"1.4.2","description":"Simple parallax scrolling effect inspired by spotify.com implemented as a jQuery plugin","main":"parallax.min.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pixelcog/parallax.js.git"},"keywords":["parallax","scroll","scrolling","image"],"author":"","license":"MIT","bugs":{"url":"https://github.com/pixelcog/parallax.js/issues"},"homepage":"https://github.com/pixelcog/parallax.js#readme","dependencies":{"jquery":">=1.7"},"gitHead":"9ed1680a663229c77e8decc4dae6d90510c66046","_id":"jquery-parallax.js@1.4.2","_shasum":"565eaa5e0cd84ca1d08f55f1e917d3b3a5e09344","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"ramytamer","email":"ramytamer94@gmail.com"},"dist":{"shasum":"565eaa5e0cd84ca1d08f55f1e917d3b3a5e09344","tarball":"https://registry.npmjs.org/jquery-parallax.js/-/jquery-parallax.js-1.4.2.tgz","integrity":"sha512-dyuKOy+XACFg1pP78vf+8IksUYRlSjnPEF2SRUsPQJv0OvPQoo6bpMAcIMNbMFFxWZv8eiXH4CceBqjxV8PD4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICSC/98HEvB+NTd0u/Tw6hJ0QPB6fLP5B0NP9CiS8+F8AiEAh//IOwga8o4eeLnAxho3XQrNGgndPxJHH3JKDfOUI3w="}]},"maintainers":[{"name":"ramytamer","email":"ramytamer94@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jquery-parallax.js-1.4.2.tgz_1473794408950_0.8291577722411603"}},"1.4.3":{"name":"jquery-parallax.js","version":"1.4.3","description":"Simple parallax scrolling effect inspired by spotify.com implemented as a jQuery plugin","main":"parallax.min.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pixelcog/parallax.js.git"},"keywords":["parallax","scroll","scrolling","image"],"author":"","license":"MIT","bugs":{"url":"https://github.com/pixelcog/parallax.js/issues"},"homepage":"https://github.com/pixelcog/parallax.js#readme","dependencies":{"jquery":">=1.7"},"gitHead":"68069ad6e7298640a4ae649665f2cb4c6c248f56","_id":"jquery-parallax.js@1.4.3","_shasum":"734584df82266d24472ebf227dbbc63bf5eb860c","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"ramytamer","email":"ramytamer94@gmail.com"},"dist":{"shasum":"734584df82266d24472ebf227dbbc63bf5eb860c","tarball":"https://registry.npmjs.org/jquery-parallax.js/-/jquery-parallax.js-1.4.3.tgz","integrity":"sha512-9StTlKTGKDsrdZqzGUrYWhYFn7kYGbbH2ZFQBJF3Zt0Hn+wUuqivU+orwca82c2DIHtqLlcgSBzwPND1D+JrrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPyE28R7n9XYDwxPMhrth6wPK97o1zf7tPAoq2iBgHDQIhAJMYsNVu3YDGDtmpXiesyeOtcKyaAIT8EoDzoyqjA3wO"}]},"maintainers":[{"name":"ramytamer","email":"ramytamer94@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/jquery-parallax.js-1.4.3.tgz_1473794672335_0.30665811826474965"}},"1.5.0":{"name":"jquery-parallax.js","version":"1.5.0","description":"Simple parallax scrolling effect inspired by spotify.com implemented as a jQuery plugin","main":"parallax.min.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pixelcog/parallax.js.git"},"keywords":["parallax","scroll","scrolling","image"],"author":"","license":"MIT","bugs":{"url":"https://github.com/pixelcog/parallax.js/issues"},"homepage":"https://github.com/pixelcog/parallax.js#readme","dependencies":{"jquery":">=1.7"},"gitHead":"005408bc5d09b2a0cb3ef1dfd3721952aac80ed4","_id":"jquery-parallax.js@1.5.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.4","_npmUser":{"name":"ramytamer","email":"ramytamer94@gmail.com"},"dist":{"integrity":"sha512-+SyyADkSloW92ZbqJ53yT8M+36GLI+SFOM32q3NeScEJ32u+YCxrDCmpdZmBjrUcJ/CFYuaq9fRwvhfE5u75ew==","shasum":"4d57f669db2374526bbb6fd595830cecadd3c71f","tarball":"https://registry.npmjs.org/jquery-parallax.js/-/jquery-parallax.js-1.5.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF4MQtD1/z7nykFI/iZH6LzIsDGzzL301Rc9Vr8Eo9dmAiEAuDrIwVyD8OSBT00n25Ac6fAN18scpb9cnrP1JVBfz1Q="}]},"maintainers":[{"name":"ramytamer","email":"ramytamer94@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery-parallax.js-1.5.0.tgz_1508406539139_0.17463121190667152"}}},"readme":"Parallax.js\n===========\n\nSimple parallax scrolling effect inspired by [Spotify.com](http://spotify.com/) implemented as a jQuery plugin  \n[http://pixelcog.com/parallax.js/](http://pixelcog.com/parallax.js/)\n\n\nPlease also check our [v2.0.0-alpha](https://github.com/pixelcog/parallax.js/tree/v2.0.0-alpha)! We'd be happy to receive your feedback!\n\n\n## Installation\n\n### NPM\n\n```bash\nnpm i --save jquery-parallax.js\n```\n\n### Yarn\n\n```bash\nyarn add jquery-parallax.js\n```\n\n### Bower\n\nPlease note that although Bower is still maintained, they recommend Yarn for new projects.\n\n```bash\n$ bower i --save parallax.js\n```\n\n### Setup\n\nInclude `parallax.min.js` in your document after including jQuery (compatible with jQuery >= 1.7).\n\n```html\n<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>\n<script src=\"/path/to/parallax.min.js\"></script>\n```\n\nUse these CDN links, provided by jsDelivr.com\n```html\n<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/parallax.js/1.4.2/parallax.min.js\"></script>\n```\n\n## Usage\n\nPlease note, that `<!DOCTYPE html>` on top of your document is required!\n\n### Via data attributes\n\nTo easily add a parallax effect behind an element, add `data-parallax=\"scroll\"` to the element you want to use, and specify an image with `data-image-src=\"/path/to/image.jpg\"`.\n\n```html\n<div class=\"parallax-window\" data-parallax=\"scroll\" data-image-src=\"/path/to/image.jpg\"></div>\n```\n\n### Via JavaScript\n\nTo call the parallax plugin manually, simply select your target element with jQuery and do the following:\n\n```javascript\n$('.parallax-window').parallax({imageSrc: '/path/to/image.jpg'});\n```\n\n### Notes\n\nWhat parallax.js will do is create a fixed-position element for each parallax image at the start of the document's body (or another configurable container). This mirror element will sit behind the other elements and match the position and dimensions of its target object.\n\nDue to the nature of this implementation, you must ensure that these parallax objects and any layers below them are transparent so that you can see the parallax effect underneath.  Also, if there is no other content in this element, you will need to ensure that it has some fixed dimensions otherwise you won't see anything.\n\n```css\n.parallax-window {\n\tmin-height: 400px;\n\tbackground: transparent;\n}\n```\n\nAlso, keep in mind that once initialized, the parallax plugin presumes a fixed page layout unless it encounters a `scroll` or `resize` event.  If you have a dynamic page in which another javascript method may alter the DOM, you must manually refresh the parallax effect with the following commands:\n\n```javascript\njQuery(window).trigger('resize').trigger('scroll');\n```\n\n### Using inner HTML for complex content\n\nYou can use the following syntax to enable complex content for the parallax:\n\n```html\n<div class=\"parallax-window\">\n  <div class=\"parallax-slider\">\n    <span style=\"position:absolute; top: 400px; left: 400px;\">Some Text</span>\n\t<p>Some other Content</p>\n  </div>\n</div>\n```\nPlease note, that the div with class \"parallax-slider\" is essential here.\n\nYou then need to initialize it through JS and provide the naturalWidth and naturalHeight options in order to be rendered correctly.\n\n```\n$('.parallax-window').parallax({\n    naturalWidth: 600,\n    naturalHeight: 400\n  });\n```\n\nThis also makes it possible to use responsive images in the slider:\n\n```html\n<div class=\"parallax-window\">\n  <div class=\"parallax-slider\">\n    <img src=\"/path/to/image.jpg\" srcset=\"/path/to/image-400px.jpg 400w, /path/to/image-800px.jpg 800w, /path/to/image-1200px.jpg 1200w\" sizes=\"100vw\">\n  </div>\n</div>\n```\n\n## Options\n\nOptions can be passed in via data attributes of JavaScript.  For data attributes, append the option name to `data-`, as in `data-image-src=\"\"`.\n\nNote that when specifying these options as html data-attributes, you should convert \"camelCased\" variable names into \"dash-separated\" lower-case names (e.g. `zIndex` would be `data-z-index=\"\"`).\n\n<table class=\"table table-bordered table-striped\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th style=\"width: 100px;\">Name</th>\n\t\t\t<th style=\"width: 100px;\">type</th>\n\t\t\t<th style=\"width: 50px;\">default</th>\n\t\t\t<th>description</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t<tr>\n\t\t\t<td>imageSrc</td>\n\t\t\t<td>path</td>\n\t\t\t<td>null</td>\n\t\t\t<td>You must provide a path to the image you wish to apply to the parallax effect.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>naturalWidth</td>\n\t\t\t<td>number</td>\n\t\t\t<td>auto</td>\n\t\t\t<td rowspan=\"2\">You can provide the natural width and natural height of an image to speed up loading and reduce error when determining the correct aspect ratio of the image.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>naturalHeight</td>\n\t\t\t<td>number</td>\n\t\t\t<td>auto</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>position</td>\n\t\t\t<td>xPos yPos</td>\n\t\t\t<td>center center</td>\n\t\t\t<td rowspan=\"3\">This is analogous to the background-position css property. Specify coordinates as top, bottom, right, left, center, or pixel values (e.g. -10px 0px). The parallax image will be positioned as close to these values as possible while still covering the target element.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>positionX</td>\n\t\t\t<td>xPos</td>\n\t\t\t<td>center</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>positionY</td>\n\t\t\t<td>yPos</td>\n\t\t\t<td>center</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>speed</td>\n\t\t\t<td>float</td>\n\t\t\t<td>0.2</td>\n\t\t\t<td>The speed at which the parallax effect runs. 0.0 means the image will appear fixed in place, and 1.0 the image will flow at the same speed as the page content.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>zIndex</td>\n\t\t\t<td>number</td>\n\t\t\t<td>-100</td>\n\t\t\t<td>The z-index value of the fixed-position elements.  By default these will be behind everything else on the page.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>bleed</td>\n\t\t\t<td>number</td>\n\t\t\t<td>0</td>\n\t\t\t<td>You can optionally set the parallax mirror element to extend a few pixels above and below the mirrored element.  This can hide slow or stuttering scroll events in certain browsers.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>iosFix</td>\n\t\t\t<td>boolean</td>\n\t\t\t<td>true</td>\n\t\t\t<td>iOS devices are incompatable with this plugin. If true, this option will set the parallax image as a static, centered background image whenever it detects an iOS user agent. Disable this if you wish to implement your own graceful degradation.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>androidFix</td>\n\t\t\t<td>boolean</td>\n\t\t\t<td>true</td>\n\t\t\t<td>If true, this option will set the parallax image as a static, centered background image whenever it detects an Android user agent. Disable this if you wish to enable the parallax scrolling effect on Android devices.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>overScrollFix</td>\n\t\t\t<td>boolean</td>\n\t\t\t<td>false</td>\n\t\t\t<td>(Experimental) If true, will freeze the parallax effect when \"over scrolling\" in browsers like Safari to prevent unexpected gaps caused by negative scroll positions.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>mirrorContainer</td>\n\t\t\t<td>jQuery Selector</td>\n\t\t\t<td>body</td>\n\t\t\t<td>The parallax mirror will be prepended into this container.</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n## Contributing\n\nIf you have a pull request you would like to submit, please ensure that you update the minified version of the library along with your code changes.  This project uses [uglifyjs](https://www.npmjs.com/package/uglify-js) to perform code compression.\n\nPlease use the following command:\n\n\tuglifyjs parallax.js --comments -m -c -o parallax.min.js\n\n\nLICENSE\n=======\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 PixelCog Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","maintainers":[{"email":"w.stoettinger@gmx.at","name":"w.stoettinger"},{"email":"ramytamer94@gmail.com","name":"ramytamer"}],"time":{"modified":"2022-06-19T05:08:48.017Z","created":"2016-09-13T19:20:10.855Z","1.4.2":"2016-09-13T19:20:10.855Z","1.4.3":"2016-09-13T19:24:32.867Z","1.5.0":"2017-10-19T09:49:00.115Z","1.5.1":"2017-10-19T09:49:33.408Z"},"homepage":"https://github.com/pixelcog/parallax.js#readme","keywords":["parallax","scroll","scrolling","image"],"repository":{"type":"git","url":"git+https://github.com/pixelcog/parallax.js.git"},"bugs":{"url":"https://github.com/pixelcog/parallax.js/issues"},"license":"MIT","readmeFilename":"README.md","users":{"claytoncollie":true}}