All Projects → drublic → hongkong

drublic / hongkong

Licence: MIT license
A parallax scroll effect plugin

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to hongkong

react-rellax
React Parallax component using Rellax.js
Stars: ✭ 39 (-15.22%)
Mutual labels:  parallax, parallax-scrolling
universal-parallax
Easy parallax plugin using pure javascript. Also works on mobile platforms. Cross browser support.
Stars: ✭ 107 (+132.61%)
Mutual labels:  parallax, parallax-scrolling
smooth-parallax
Smooth Parallax makes it a lot easier to move objects when the page scroll with ease.
Stars: ✭ 66 (+43.48%)
Mutual labels:  parallax, parallax-scrolling
Perspective
🖼Parallax scrolling effect. And more.
Stars: ✭ 80 (+73.91%)
Mutual labels:  parallax, parallax-scrolling
Parallaxie
Easiest, Responsive and Customizable Parallax jQuery Plugin
Stars: ✭ 65 (+41.3%)
Mutual labels:  parallax, parallax-scrolling
Rallax.js
Dead simple parallax scrolling.
Stars: ✭ 1,441 (+3032.61%)
Mutual labels:  parallax, parallax-scrolling
React Stickyroll
A react implementation of stickyroll (original)
Stars: ✭ 132 (+186.96%)
Mutual labels:  parallax
React Native Stretchy
🤸‍♀️A ReactNative scrollable stretchy header component
Stars: ✭ 216 (+369.57%)
Mutual labels:  parallax
Universal Tilt.js
🎆 Parallax tilt effect library
Stars: ✭ 117 (+154.35%)
Mutual labels:  parallax
Rolly
Custom scroll with inertia, smooth parallax and scenes manager
Stars: ✭ 109 (+136.96%)
Mutual labels:  parallax
Slidemenulayout
🔥An android slide menu that supports left and right swipes and slides with parallax.(一个支持左右滑动并带有视差滑动效果的安卓侧滑菜单控件.仿[QQ/探探侧滑])
Stars: ✭ 235 (+410.87%)
Mutual labels:  parallax
Jztvosparallaxbutton
📺 tvOS Button with Parallax Effect (ObjC)
Stars: ✭ 161 (+250%)
Mutual labels:  parallax
React Lazy Hero
⚡️ A hero component for React
Stars: ✭ 134 (+191.3%)
Mutual labels:  parallax
Aksidemenu
Beautiful iOS side menu library with parallax effect. Written in Swift
Stars: ✭ 216 (+369.57%)
Mutual labels:  parallax
Flutter Ui Designs
Just collection of UI designs build with flutter. Can run on any mobile, web & desktop.
Stars: ✭ 131 (+184.78%)
Mutual labels:  parallax
Parallaxrecyclerview
Parallax effect on every item of your RecyclerView.
Stars: ✭ 237 (+415.22%)
Mutual labels:  parallax
React Scroll Parallax
🔮 React components to create parallax scroll effects for banners, images or any other DOM elements
Stars: ✭ 1,699 (+3593.48%)
Mutual labels:  parallax
React Parallax Component
Easiest way to add scroll parallax effect on the component
Stars: ✭ 143 (+210.87%)
Mutual labels:  parallax
Backgroundvideo
A lightweight parallax background video solution that behaves like the CSS3 property, background-size: cover
Stars: ✭ 234 (+408.7%)
Mutual labels:  parallax
Mpparallaxview
Apple TV Parallax effect in Swift.
Stars: ✭ 1,727 (+3654.35%)
Mutual labels:  parallax

Hongkong - jQuery based plugin for parallax scrolling

Build Status Dependency Status devDependency Status

Install via npm

npm i --save hongkong

Usage

Please add bin/hongkong.js to your website. Make sure to include the dependency jQuery.

<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/hongkong/bin/hongkong.js"></script>

Just add the attribute data-parallax. For directions of the "floating" element please use data-parallax-top or data-parallax-bottom.

You can add a data-parallax-factor with a value which is an integer to change the factor of which the element should move. Default is 4.

Then call

$.hongkong();

somewhere within your JavaScript.

[ES6 | ES2015 | ES2016 | ES2017] modules

With ES6 you can use Hongkong as follows:

import $ from 'jquery';
import hongkong from 'hongkong';

hongkong($);
$.hongkong();

Options

You can pass options to Hongkong to customize it a bit:

  • factor: default factor to use for momentum if no other is set via a data-attribute; default: 4
  • mobile: support parallax effect on mobile; default: false
  • mediaQuery: Media query to match against when disabling parallax on mobile; default: (max-width: 42em)
  • selector: Selector to use to detect elements that should be scrolled; default [data-parallax]
  • threshold: Set threshold for showing and hiding elements; default 0

Data attributes

  • data-parallax-top
  • data-parallax-bottom
  • data-parallax-position-x
  • data-parallax-factor
  • data-parallax-remove-initial-offset
  • data-parallax-remove-general-offset

Development

Run npm i inside this folder. Start a development server with npm start.

License

The MIT License (MIT) Copyright (c) 2014 Hans Christian Reinl

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].