Submit your widget

Beautiful jQuery Parallax effect

Created 7 years ago   Views 39757   downloads 6838    Author dom111
Beautiful jQuery Parallax effect
View DemoDownload 140.5 KB
157
Share |

 the parallax script . It’s called in a more jQuery like manner now and has a couple of useful options for inverting the movement and changing the unit of measurement to any jQuery/CSS supported unit.

Example code:

$('div.parallax').parallax({
  'elements': [
    {
      'selector': 'body',
      'properties': {
        'x': {
          'background-position-x': {
            'initial': 0,
            'multiplier': 0.1,
            'invert': true
          }
        }
      }
    },
    {
      'selector': 'div.outer',
      'properties': {
        'x': {
          'background-position-x': {
            'initial': 50,
            'multiplier': 0.02,
            'unit': '%'
          }
        }
      }
    },
    {
      'selector': 'div.inner',
      'properties': {
        'x': {
          'background-position-x': {
            'initial': 0,
            'multiplier': 0.3
          }
        }
      }
    }
  ]
});

The article source:http://www.dom111.co.uk/blog/coding/jquery-parallax-0-2-minor-updates/125