Skip to content
This repository was archived by the owner on Jul 27, 2020. It is now read-only.

Conversation

@AxelBriche
Copy link

Rename parameter and change position.

New JS (load before body element) for auto-load all parallax elements:

$(document).ready(function(){
$('.ab-parallax').each(function() {
xpos = $(this).attr('parallax-xpos');
ypos = $(this).attr('parallax-ypos');
speed = $(this).attr('parallax-speed');
$(this).parallax(xpos, ypos, speed);
});
})

And new usage in html :

Please update documentation if you approve my work :)

Rename parameter and change position.

New JS (load before body element) for auto-load all parallax elements:

$(document).ready(function(){
	$('.ab-parallax').each(function() {
		xpos  = $(this).attr('parallax-xpos');
		ypos  = $(this).attr('parallax-ypos');
		speed = $(this).attr('parallax-speed');
		$(this).parallax(xpos, ypos, speed);
	});
})

And new usage in html :

<div id="intro" **class="ab-parallax" parallax-xpos="50%" parallax-ypos="100" parallax-speed="0.8"**>
	<!-- content here -->
</div>

Please update documentation if you approve my work :)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant