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

Question: Horizontal page slide FX #92

Closed
johnaregan opened this issue Feb 15, 2013 · 2 comments
Closed

Question: Horizontal page slide FX #92

johnaregan opened this issue Feb 15, 2013 · 2 comments

Comments

@johnaregan
Copy link

Hi, I know that you can use fx: 'slide' for page transition. But the default is to slide up from the bottom. I would like also to be able to slide a page in from the left or right rather like FSS.js http://www.interactivegoods.com/fss/#/introduction. Is this possible?

(fantatic library BTW)

@finnsson
Copy link
Owner

If one can write something like $.fn.slideUp it would be trivial to add a slideLeft or slideRight fx like (search for pager.fx.slide in the source code):

pager.fx.slideLeft = pager.fx.jQuerySync(slideLeft, slideAwayLeft);

I've just skimmed the jQuery documentation and I think it might be possible to add this using (dry coding)

var slideLeft = function(time, callback) {        
    this.animate({width: 'toggle'}, time, callback);
};
var slideAwayLeft = function(time, callback) {
    this.animate({width: 'toggle'}, time, callback);
};

{width: 'toggle'} might need to be changed to something else and I think you might need to add/subtract overflow: hidden. This might be interesting to add to the lib so if you get something working I'll be interested in getting a pull request.

@johnaregan
Copy link
Author

Hi finnsson, thanks for the prompt reply. I'll be trying your suggestion and if successful, i'll send a pull request.

@DKhalil DKhalil closed this as completed May 15, 2017
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