Socket
Socket
Sign inDemoInstall

parallax_content

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    parallax_content

parallax content


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Install size
5.90 MB
Created
Weekly downloads
 

Changelog

Source

[1.0.7] - 2018-7-24

Added

  • Gyro support

Readme

Source

parallaxContent

Demo

https://lemehovskiy.github.io/parallax-content

Package Managers

# NPM
npm install parallax_content

Installation

Include js
<script src="TweenLite.min.js"></script>
<script src="CSSPlugin.min.js"></script>
<script src="jquery.min.js"></script>
<script src="parallax_content.js"></script>
Set HTML
<div class="parallax-title">
    Parallax title
</div>
Call the plugin
<script type="text/javascript">
    $(document).ready(function() {
      $('.parallax-title').parallaxContent();
    });
</script>
In result
<html>
  <head>
  <title>My website</title>
  </head>
  <body>

  <div class="parallax-title">
    Parallax title
  </div>

  <script src="TweenLite.min.js"></script>
  <script src="CSSPlugin.min.js"></script>
  <script src="jquery.min.js"></script>
  <script src="parallax_content.js"></script>

  <script type="text/javascript">
     $(document).ready(function() {
         $('.parallax-title').parallaxContent();
     });
  </script>

  </body>
</html>

Data Attribute Settings

In parallaxContent you can add settings using the data-parallax-content attribute. You still need to call $(element).parallaxContent() to initialize parallaxContent on the element.

Example:

<div data-parallax-content='{"shift": 10, "duration": 4}'></div>

Settings

OptionTypeDefault
shiftint10
durationint1.5
eventsarray['scroll', 'gyro']
gyroSensitivityint30

Browser support

  • Chrome
  • Firefox
  • Opera
  • IE10/11

Dependencies

  • jQuery 1.7
  • Gsap

Keywords

FAQs

Last updated on 24 Jul 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc