So I’ve updated the parallax script a little. 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
}
}
}
}
]
});
You can see a demo of the updated script, or just download the package (includes jQuery 1.3.2).
Edit: I’ve added a post with a couple of working examples here.