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 of 'beforeSlideChange' method #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add of 'beforeSlideChange' method #12

wants to merge 1 commit into from

Conversation

chienrouge
Copy link

Just to be able to call a custom method when the new element is about to slide in.

Just to be able to call a custom method when the new element is about to slide in.
@jakobholmelund
Copy link
Owner

Hmm could this be implemented with :once ?

@jakobholmelund
Copy link
Owner

Altso needs to be updated with newest master

@chienrouge
Copy link
Author

Hi there.
you're perfectly right. will do so straight away :)

@RiZKiT
Copy link
Collaborator

RiZKiT commented Mar 22, 2013

I'm not sure why you use an event, try the following, should work fine (the first line is the only interesting one, the others are just to show the position):

...
self.options.beforeSlideChange(activeSlide.get("morph"));
activeSlide.get("morph").start(morphOptions).chain(function(){
    self.slides[prevActiveSlideIndex].setStyle("z-index", 1);
    self.unlock();
    self.options.afterSlideChange(this);
});
...

and if you already modify the options, please add the following (you may change the name morphFx):

...
    beforeSlideChange: function(morphFx){},// empty function
    afterSlideChange: function(morphFx){}// empty function
...

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

Successfully merging this pull request may close these issues.

3 participants