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

Add a zIndex option #200

Closed
Rycochet opened this issue Jul 23, 2014 · 4 comments
Closed

Add a zIndex option #200

Rycochet opened this issue Jul 23, 2014 · 4 comments

Comments

@Rycochet
Copy link
Collaborator

Where there's already options for Display and Visibility, having a zIndex one may be useful.

It would remember the old value, and only set the zIndex while animating, then reset to the saved value after finishing or being stopped (sort of like how the translateZ value is set for mobile acceleration etc).

While the alternative (setting a z-index on the .animating class) works very well for my specific use, it wouldn't work so well if I was only wanting to set the z-index on one specific animation etc - hence I'm going to reference #194 here since being able to change the animating class in an option could achieve the same effect.

@julianshapiro
Copy link
Owner

Hey Robin!

Legitimate suggestion, but I'm unlikely to implement this due to what I presume will be low demand. If it's asked for more times in the future, I will consider it. For now, I recommend doing it manually in JS.

@dbenoni
Copy link

dbenoni commented Jul 30, 2014

+1 for the zIndex parameter!

@julianshapiro
Copy link
Owner

You'll want to set this yourselves using the begin and complete callbacks or by leveraging the velocity-animate class. I am unlikely to implement this :)

@gabemartin
Copy link

In case this can help someone else, here is how I handled it using the complete callback:

$(".element") .delay(500) .velocity("transition.slideDownIn", { duration: 500, complete: function() { $(this).css("transform",""); } })

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

4 participants