Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using plax multiple times on a page #20

Open
seanjacob opened this issue Apr 17, 2012 · 4 comments
Open

Using plax multiple times on a page #20

seanjacob opened this issue Apr 17, 2012 · 4 comments

Comments

@seanjacob
Copy link

So I have set up two zones #one & #two to use plax in. It seems that plax #one has control of both zones.

Here is my setup, am I doing anything wrong?

//PLAX - ONE
$('#one img').plaxify()
$('#one  .back').plaxify({ "xRange": 50, "yRange": 0 })
$('#one .front').plaxify({ "xRange": 30, "yRange": 0, "invert": true })
$.plax.enable({ "activityTarget": $('#one') })

//PLAX - TWO
$('#two img').plaxify()
$('#two .back').plaxify({ "xRange": 50, "yRange": 0, "invert": true })
$('#two .front').plaxify({ "xRange": 30, "yRange": 0 })
$.plax.enable({ "activityTarget": $('#two') })

Cheers Sean.

@cameronmcefee
Copy link
Owner

Hi @seanjacob,

You're not doing anything wrong per se. Plax simply doesn't support what you want to do at this point. It only supports one activity target and one event stream, so any objects you call plaxify() all get assigned to that single instance. It would be cool to support the notion of encapsulated plax zones, each having it's own set of objects, but that's beyond my knowledge at the moment. I'll ask around and see if I can come up with a solid way to implement it.

@seanjacob
Copy link
Author

Cool thanks for clearing that up.

For a work around I've just copied the file and did some renaming so I am calling plax2 on my second zone.

@Sam-Hoult
Copy link

This this be implemented?

@cameronmcefee
Copy link
Owner

Plax is a bit of a back-burner project at the moment, so unfortunately no work has been made on this front yet. I happily accept pull requests though, if you're interested in implementing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants