Added impress:stepgoto event to api #176

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

dbankier commented Jul 4, 2012

Needed an event to be triggered when going to step (with the target) and prior to the entering it.

Hey dbankir.

we can show the slide number using Impress.js

There is a code for STEP EVENTS in Impress. go and search in the Impress.js

Once you find the place

there you can see the code like as follow

var onStepEnter = function (step) {
if (lastEntered !== step) {
triggerEvent(step, "impress:stepenter");
lastEntered = step;
}
};

now what u need to do is just writhe alert(step.id) as follows.

var onStepEnter = function (step) {
if (lastEntered !== step) {
triggerEvent(step, "impress:stepenter");
lastEntered = step;
alert(step.id);
if(step.id=="step-2") // if u want a event on step 2 then
{
//write ur jQuery event to fire
jQuery(".s66").show();
}
else
{
// write ur jQuery event to fire ex
jQuery(".s66").hide();
}

}
};
Thats it you will be alerted when u click on next slide.. so now u can use this step id to show in ur DOM.

Try...

Have a great day..

stepenter is fired when the transition has completed. The event in the pull request is for triggering the target location when leaving a step (which is not necessarily the step that follows the current one as you might jump). It is handy for realtime uses. Have a look at this project: impressiv.js.

Member

FagnerMartinsBrack commented Feb 5, 2016

Hi @dbankier, in an effort to clear up older issues/PRs we are pinging back to know if you are still tracking this request.

To give a little bit of context, recently a decision was made in the project to make the development more active and the first task is to clear up older issues like this one to see if the OP is still interested in keep it going.

dbankier commented Feb 7, 2016

This PR is long forgotten to me (3.5 years old). I have forgotten the context and need of this PR and have not used impress for a long time. Feel free to merge it if you see any value. As project maintainer it is ultimately your decision.

Member

FagnerMartinsBrack commented Feb 7, 2016

@dbankier Thanks for the response!

Since you are not tracking this PR anymore and you lost context, I have created an issue to track this request instead: #513

This PR will be closed but we might cherry-pick the commit later if we see the need.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment