jQuery plugin for creating interactive parallax effect

Related tags

Scroll jparallax
Overview

jquery.parallax

What does jquery.parallax do?

jquery.parallax turns nodes into absolutely positioned layers that move in response to the mouse. Depending on their dimensions, and on the options passed in, these layers move at different rates, in a parallaxy kind of way.

Demos and docs

stephband.info/jparallax/

Comments
  • Firefox Issues

    Firefox Issues

    taken from http://forum.jquery.com/topic/jparallax-0-9-1-incompatible-with-jquery-1-4-2:

    Any chance of adding this fix to the next update?

    I downloaded the latest version from github and found that if I remove two instances of "console.log(b.mouseport);" from the jquery.jparallax.js and the jquery.jparallax.min.js files, the plugin will once again work in Firefox.

    The "console.log" is used to print out information in Firebug, but if the browser addon is closed or doesn't exist, the script stops.

    I hope that helps!

    opened by joelkesler 6
  • Re-initialising jParallax with same mouseport fails

    Re-initialising jParallax with same mouseport fails

    ul id="parallax"
      li id="parallax-1"
      li id="parallax-2"
    
    ul id="parallax2"

    $('#parallax>li').parallax({mouseport: $("#parallax"), yparallax:false});

    This alone works perfect.

    $('#parallax>li').parallax({mouseport: $("#parallax2"), yparallax:false});

    This also works perfect. Parallax is now controlled by two viewports simultaneously.

    Now to the interesting part:

    $('#parallax>li').parallax({mouseport: $("#parallax"), yparallax:false}); $('#parallax').html('

  • '); $('#parallax>li').parallax({mouseport: $("#parallax"), yparallax:false});

    This simply does not work. Replacing content of #parallax (to swap images) and reinitializing with same mouseport fails without any errors.

    $('#parallax>li').parallax({mouseport: $("#parallax"), yparallax:false}); $('#parallax').html('

  • '); $('#parallax>li').parallax({mouseport: $("#parallax2"), yparallax:false});

    But surprisingly this works for second viewport.

    So the problem is that new layers inserted into the same container fail to reinitialize with the same mouseport, but work fine with different one.

    opened by stephband 6
  • abysmal performance on ios 4.1, and samsung galaxy note?

    abysmal performance on ios 4.1, and samsung galaxy note?

    it barely moves on my iphone 3g ios4.1 and very sluggish on my samsung galaxy note which boasts a 1ghz processor.

    are you guys having the same bad performance issue?

    opened by mickeyren 5
  • Virtual Layer Width > Making Elements Clickable

    Virtual Layer Width > Making Elements Clickable

    Great plugin! I have spent a day diving into using this plugin and I am having great fun. I understand that it is the width each element that determines how 'far', and therefor how 'fast' the layer must travel. However, setting the layers width so wide covers over all elements underneath that are to the left or right, blocking the mouse from being able to click the covered elements.

    What I would like to do is be able to do it define each layers width and height to tightly bound the enclosed elements, and then assign a virtual value to define what the plugin is using as 'width'.

    This would allow placing many small clickable elements on the stage, give each a virtual 'width' value to use for calculating the parallax position, while not covering over elements unless directly on-top.

    Any thoughts?

    opened by baden03 5
  • in jQuery.event.frame.js handle is deprecated in jQuery 1.9

    in jQuery.event.frame.js handle is deprecated in jQuery 1.9

    Hi!

    It seems that "handle" is deprecated and no longer used in Jquery 1.9. Hence it returns undefined in event.frame. As I have read, it is just an alias that has been removed.

    Replacing it with dispatch will ensure compatibility with jQuery 1.9 (at least it is working for me)/

    Line 101 of event.frame.js:

    jQuery.event.handle.apply(this, arguments);
    

    should now be

    jQuery.event.dispatch.apply(this, arguments);
    

    Thanks !

    opened by charleslouis 4
  • parallax not working if a layer is on top

    parallax not working if a layer is on top

    Hi,

    I have a parallax setup to work on the parallax container not the body. If I apply a layer on top of the parallax container the parallax effect stops working.

    This doesn't happen when you configure the parallax on the body.

    Is there a workaround for this?

    Thank you

    opened by Cipa 4
  • Worked must once mouse out of winodw.

    Worked must once mouse out of winodw.

    First, Thank you. good plug in!! (Sorry, I am poor at english.)

    Very useful.

    But sometimes not worked.

    When web page data not complete load (loading), mouse move. -> Just not worked !! (but worked when must once out of window, and again enter window mouse move.)

    But mouse not move, while web page loading. When web page complete load and mouse move. => Just worked !!

    in chrome, FF, IE.

    So i add freeze code,

    (function($){
    $(document).ready(function(){ var $bg3 = $('#bg3'), $bgImg =$('#bgImg'), $bg2 = $('#bg2'), $bg1=$('#bg1');

             $(window).resize(function(){
                $bg1.css({'left':'0px','margin':'auto'});
                $bg2.css({'left':'0px','margin':'auto'});
                $bg3.css({'left':'0px','margin':'auto'});
    

    $('.parallax-layer').trigger('freeze'); <-------------------freeze $('.parallax-layer').parallax({mouseport: $('html,body'),yparallax:false,xparallax:'70%',frameDuration:10}); <-------------------move $('.parallax-layer').trigger('unfreeze'); <-------------------unfreeze }).resize(); }); //ready function moveBg(){ $('.parallax-layer').trigger('unfreeze'); } window.onload = moveBg;
    })(window.jQuery);

    Result, chrome, FF worked. But IE is not worked.

    example site : http://werty.co.kr/blog/

    opened by mynain 2
  • Images are 404'ing

    Images are 404'ing

    Hey @stephband

    Do you happen to have copies of the images you had here: http://webdev.stephband.info/jparallax/images/parallax_button/*.png ? The library you've written is amazing and we need to ensure that people see the great work you've done but right now I'm assuming you're upgrading your web site, which is why the examples are all borked.

    Could the images be uploaded to a free image hosting service? or even just on flickr? Let me know when the old assets have been uploaded and I can land a patch for you.

    Cheers, Jaime

    opened by jbueza 2
  • parallax is slow on FF

    parallax is slow on FF

    Hello, first thank you for your amazing job here. got a little issue with Firefox significantly slowing down the parallax effect. Works fine on Chrome and IE.

    Maybe it has nothing to do with that, but It seems like FF fails to calculate accurately the css top, left and margins compared to the other browsers. Random line on Chrome :

    Random line on Firefox :

    An idea on how to fix this ?

    opened by heunb 1
  • Worked must once mouse out of winodw.

    Worked must once mouse out of winodw.

    First, Thank you. good plug in!! (Sorry, I am poor at english.)

    Very useful.

    But sometimes not worked.

    When web page data not complete load (loading), mouse move. -> Just not worked !! (but worked when must once out of window, and again enter window mouse move.)

    But mouse not move, while web page loading. When web page complete load and mouse move. => Just worked !!

    in chrome, FF, IE.

    So i add freeze code,

    (function($){
    $(document).ready(function(){ var $bg3 = $('#bg3'), $bgImg =$('#bgImg'), $bg2 = $('#bg2'), $bg1=$('#bg1');

             $(window).resize(function(){
                $bg1.css({'left':'0px','margin':'auto'});
                $bg2.css({'left':'0px','margin':'auto'});
                $bg3.css({'left':'0px','margin':'auto'});
    

    $('.parallax-layer').trigger('freeze'); <-------------------freeze $('.parallax-layer').parallax({mouseport: $('html,body'),yparallax:false,xparallax:'70%',frameDuration:10}); <-------------------move $('.parallax-layer').trigger('unfreeze'); <-------------------unfreeze }).resize(); }); //ready function moveBg(){ $('.parallax-layer').trigger('unfreeze'); } window.onload = moveBg;

    })(window.jQuery);

    Result, chrome, FF worked. But IE is not worked.

    example site : http://werty.co.kr/blog/

    opened by mynain 1
  • full screen resize

    full screen resize

    Whenever I attempt to resize the browser window the images and everything resize accordingly but the distance the layers travel doesn't seem to update so it slides the images beyond the target showing my nasty background color.

    http://184.71.75.30:3000/photomonkey/ (Full site; will make a demo later)

    opened by ShaneShipston 1
  • This compressed version not working

    This compressed version not working

    Hi, I download this plugin from and First time I use this file with the latest version of jQuery. But I saw it not working. Then I use the non compressed version(jquery.parallax.js) this work fine with latest version of jQuery. Then I compressed the jquery.parallax.js file and I use the code which compressed by me. That time it work. It means that here it a problem in the current compressed file(jquery.parallax.min.js).

    So I request you to change the file. I change the code with the code which compressed by me.

    Thank you.

    opened by arafatjiko 0
  • Help is needed! Ignoring the Y axis (yparallax)

    Help is needed! Ignoring the Y axis (yparallax)

    Hello! Thanks for the plugin! But I found an error. After updating the content with Ajax, the Y axis is ignored, that is, margin-top does not change its value. How can I fix this?

    Thank you

    $(this).find("img").parallax({ xparallax: '55px', yparallax: '50px', mouseport: $(this).parent() }, { xparallax: '80px', yparallax: '84px', mouseport: $(this).parent() });

    opened by DexColt 1
  • Feature #90: Adding touch compatibility (new event listeners).

    Feature #90: Adding touch compatibility (new event listeners).

    Currently a work in progress; still needs a proper initialization on load. Possibly as a configuration parameter, since naturally you cannot hover over anything with a touch device, but you can swipe. Only works currently if you tap first on the viewport and then swipe around. The touch emulates a mouseenter event. The idea then would probably be to trigger a mouseenter event on any of the touch events in case it hasn't already been triggered.

    Currently how I'm doing this outside of this library is with Modernizr, simply looking for a touch class and then initializing it on page load:

    if ($('html').hasClass('touch')) viewport.mouseenter();
    

    Again a better solution here would be to wait first for some interaction, since as a plugin, it needs to be concerned only about it self and not initialize due to changes in global state (i.e. page load).

    opened by patricknelson 0
  • Add touch event listeners.

    Add touch event listeners.

    Would be nice to add compatibility for touch devices.

    This issue is just a placeholder until I can submit a real PR for a reasonably solid proof of concept (stable enough for me to push to production at least).

    opened by patricknelson 0
  • Decay issue

    Decay issue

    Decay resets to 0 when mouse stays inside of the mouseport. After leaving the mouseport, decay switches back to desired value on entering the mouseport again.

    opened by david-stefan 6
Owner
stephband
Cofounder of @cruncher, front-end dev and musician.
stephband
Parallax Engine that reacts to the orientation of a smart device

Parallax Engine that reacts to the orientation of a smart device. Where no gyroscope or motion detection hardware is available, the position of the cu

Matthew Wagerfield 16k Jan 8, 2023
Stellar.js - Parallax scrolling made easy

Stellar.js PLEASE NOTE: This project is no longer maintained. If parallax scrolling is something you care about, please apply to become a contributor

Mark Dalgleish 4.6k Dec 10, 2022
Simple and tiny JavaScript library that adds parallax animations on any images

simpleParallax.js simpleParallax.js is a very simple and tiny Vanilla JS library that adds parallax animations on any images. Where it may be laboriou

Geoffrey 1.5k Jan 3, 2023
Lightweight, vanilla javascript parallax library

RELLAX Rellax is a buttery smooth, super lightweight, vanilla javascript parallax library. Update: Rellax now works on mobile (v1.0.0). Demo Website G

Dixon & Moe 6.7k Dec 30, 2022
🛤 Detection of elements in viewport & smooth scrolling with parallax.

Locomotive Scroll Detection of elements in viewport & smooth scrolling with parallax effects. Installation ⚠️ Scroll-hijacking is a controversial prac

Locomotive 5.9k Dec 31, 2022
Largetable - jQuery plugin to scroll in/maximize large tables

largetable jQuery plugin to scroll in/maximize large tables Usage Install with npm: $ npm install largetable Then include largetable files in the HTM

Edinum 1 Feb 3, 2021
JQuery powered parallaxing

Plax is on the backburner and is provided as-is. I won't be adding bug fixes or future improvements at this time. Plax is old enough that there are be

Cameron McEfee 2.3k Dec 28, 2022
🚀 Scroll Follow Tab is a lightweight javascript library without jQuery, no dependencies.

Scroll Follow Tab is a lightweight javascript library without jQuery, no dependencies. It is used to make scrollspy effect for your menu, table of contents, etc. Only 21.7Kb.

Hieu Truong 11 Jun 20, 2022
Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin

#One Page Scroll 1.3.1 by Pete R. Create an Apple-like one page scroll website (iPhone 5S website) with One Page Scroll plugin Created by Pete R., Fou

Pete R. 9.6k Dec 31, 2022
fullPage plugin by Alvaro Trigo. Create full screen pages fast and simple

fullPage.js English | Español | Français | Pусский | 中文 | 한국어 Available for Vue, React and Angular. | 7Kb gziped | Created by @imac2 Demo online | Cod

Álvaro 34.3k Jan 4, 2023
Scroll-stash - A JavaScript plugin to help preserve an element's scroll position.

scroll-stash A JavaScript plugin to help preserve an element's scroll position. CodePen Example Installation npm install scroll-stash JavaScript Impo

Sebastian Nitu 5 Sep 5, 2022
BetterScroll is a plugin which is aimed at solving scrolling circumstances on the mobile side (PC supported already).

BetterScroll is a plugin which is aimed at solving scrolling circumstances on the mobile side (PC supported already).

HuangYi 15.9k Dec 30, 2022
Simple parallax scrolling effect inspired by Spotify.com implemented as a jQuery plugin

Parallax.js Simple parallax scrolling implemented as a jQuery plugin. http://pixelcog.com/parallax.js/ Please also check our v2.0.0-alpha! We'd be hap

PixelCog Inc. 3.5k Dec 21, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
👓 Parallax tilt hover effect for React JS - tilt.js

React.js - Tilt.js React version of tilt.js Demo https://vx-demo.now.sh/gallery Install yarn: yarn add react-tilt npm: npm install --save react-tilt U

Jon 340 Dec 23, 2022
Simple fixed background parallax effect in vanilla js.

Simple Parallax Simple fixed background parallax effect in vanilla js. See demo on Codepen. JS Initialise the plugin. The first argument identifies th

null 6 Jun 27, 2022
Liquideffect - Javascript Library for creating liquid effect on image and RGB effect on mouse direction.

LiquidEffect Javascript Library for creating liquid effect on image and RGB effect on mouse direction. Demo https://liquideffect.netlify.app/ Dependen

Rohail 8 May 6, 2022
Flexible, powerful and modern library for creating the running horizontal blocks effect, also known as ticker or the «marquee effect».

Cuberto Reeller Flexible, powerful and modern library for creating the running horizontal blocks effect, also known as ticker or the «marquee effect».

Cuberto 41 Jan 4, 2023