
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
parallax-element
Advanced tools
jQuery plugin that creates parallax effect for specific element.
The scroll animation speed is based upon either a data-speed
attribute in a html tag or the defaultSpeed
option.
The speed value (integer) should be kept between -1
and 1
.
A positive number makes the element appear to scroll slowly downward, while a negative integer makes the element appear to scroll slowly upward.
Javascript file:
// Default usage
$('.element').parallaxElement();
// Options
$('.element').parallaxElement({
defaultSpeed: 0.2, // Integer - Default speed if `data-speed` is not present
useOffset: true, // Boolean - Whether or not to start animations below bottom of viewport
defaultOffset: 200, // Distance before element appears to start animation
disableMobile: false, // Boolean - allow function to run on mobile devices
minWidth: false // Integer - minimum width the function should fire
});
To assign different speeds to indivudual elements, use the data-speed
attribute in html:
<div class="element" data-speed="0.1">
<!-- do stuff -->
</div>
<div class="element" data-speed="0.2">
<!-- do stuff -->
</div>
<div class="element" data-speed="-0.1">
<!-- do stuff -->
</div>
Make sure to shim jQuery and then simply require the file:
require('parallax-element');
$('.element').parallaxElement({
defaultSpeed: 0.1
});
FAQs
jQuery plugin to add parallax effect to individual elements
We found that parallax-element 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.