Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Sertion/parallax.thefarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A jQuery Parallax plugin from The Farm

Plugin for changing the background-position of elements related to the users scrolling. If if finds a way to animate the background-position it will use .animate() over .css().

Options

  • start

    A function that returns a boolean which represents if the parallax should be active or not. First parameter is the element and the second is an .offset() object. Both start and stop needs to return true for the paralax to animate.

  • stop

    A function that returns a boolean which represents if the parallax should be active or not. First parameter is the element and the second is an .offset() object. Both start and stop needs to return true for the paralax to animate.

  • xCoeff

    The multiplyer for the horizontal parallax

  • yCoeff

    The multiplyer for the vertical parallax effect

  • xOffset

    The horizontal offset (in pixels without unit)

  • yOffset

    The vertical offset (in pixels without unit)

  • xUnit

    The unit that should be used when setting the horizontal background position

  • yUnit

    The unit that should be used when setting the vertical background position

  • xMinValue

    Either false or the lowest allowed value (in pixels without unit) for the horizontal background position

  • yMinValue

    Either false or the lowest allowed value (in pixels without unit) for the vertical background position