Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
simple-parallax-jquery
Advanced tools
simpleParallax is a simple and lightweight jQuery plugin that gives your website parallax animations on the images
simpleParallax is a very simple and lightweight jQuery plugin that improve your website with parallax animations on your images.
Where it may be laborious to get results through other plugins, simpleParallax stands out for its ease and its visual rendering. The parallax effect is directly applied on image tags, there is no need to use background images.
Any image will fit. Try it out!
Make sure jQuery library is loaded before the plugin.
Simply copy/paste the below snippet just before your closing <body>
tag:
<script src="jquery.js"></script>
<script src="simpleParallax.js"></script>
or use the below CDN link provided by jsDelivr.com
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/simple-parallax-jquery@3.1.1/dist/simpleParallax.min.js"></script>
or
#npm
npm install simple-parallax-jquery
#yarn
yarn add simple-parallax-jquery
Giving the following HTML:
<img class="thumbnail" src="image.jpg" alt="image">
Simply add the following jQuery code:
$('.thumbnail').simpleParallax();
Find below the different settings you can apply to simpleParallax:
setting | default | |
---|---|---|
delay | 0.6 | add some delay for parallax animations - in second |
orientation | up | choose the parallax orientation effect - up, right, down or left |
scale | 1.2 | choose the scale ratio - need to be above 1.0 |
overflow | false | by default, the image is scaled to apply a parallax effect without any overflow on the original image container. If overflow is set to true, the image will be translated out of its natural flow without any scale. |
transition | cubic-bezier(0,0,0,1) | choose the css transition (will work only if delay is different that 0) - ease, linear, ease-in, etc. |
breakpoint | false | choose the minimum breakpoint (in pixel) where simpleParallax will be initialized - 768 |
You can apply these settings with the following jQuery code:
$('img').simpleParallax({delay: 0, orientation: 'down', scale: 1.30, overfow: true });
Find below the different methods you can use:
$('.thumbnail').data('simpleParallax').destroy();
The higher the scale setting is set, the more visible the parallax effect will be. In return, the image will lose in quality (no loss of quality if overlow option is set to false)
This plugin apply parallax on the image tag and not the background image. This gives you a lot of flexibility and can be added to any image.
You can apply simpleParallax on picture/srcset images
Open an issue or a pull request to suggest changes or additions.
FAQs
simpleParallax is a simple and lightweight jQuery plugin that gives your website parallax animations on the images
The npm package simple-parallax-jquery receives a total of 9 weekly downloads. As such, simple-parallax-jquery popularity was classified as not popular.
We found that simple-parallax-jquery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.