-
Notifications
You must be signed in to change notification settings - Fork 312
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
Feature request: 'random' value for axis #32
Comments
Mmmm I'm not sure... Now we want to change Maybe it would be a better idea to fire a 'onflip' event or something? That way the client of the library can attach an event handler that changes whatever he wants to change after the flip: $('#card').flip().on('flip', function(evt){
var newAxis;
// determine new axis randomly or whatever...
$(this).flip({axis: newAxis});
}); |
I agree that a feature like this doesn't really belong in flip. I like your idea @Download, though I think it might make the most sense to create a custom jquery event that anyone can use in the normal jquery way? |
Yes, i agree. A custom jQuery event would be the way to go. I have no experience with it however and (atm) no time to work on it... |
I also have no experience with it, but I've enough time so Ill give it a go. In your example is the function meant to be called on complete? This makes the most sense but I think @Seb33300 would need it to be called before each flip took place. Which would be a little messy to implement just because changing the axis is async itself I think all that needs to be done is determining the new axis and setting it. This is a client side concern though. Still, I'm interested in the sort of persistent callback idea so I'll try to work on that. |
@JemarJones Yes I think you are right. Most beatiful solution would probably be if you could do things like However firing it on completion will also solve most use cases I think... Maybe we need an |
jQuery events added in https://github.com/nnattawat/flip/releases/tag/v1.0.14 @Seb33300 I apologize for the highjacking of your issue! Unfortunately i believe its generally agreed upon that your suggestion doesn't quite belong in flip, but can be done with client code rather easily! Closing now. |
I think it could be interesting to add value 'random' for the axis param.
So blocks will flip randomly on x or y axis.
The text was updated successfully, but these errors were encountered: