Permalink
Browse files

Add showoff:incr event

  • Loading branch information...
bgentry committed Sep 26, 2011
1 parent ac7441e commit df260eaa84dd26923145267b57a964f9f02a74aa
Showing with 6 additions and 1 deletion.
  1. +1 −0 README.rdoc
  2. +5 −1 public/js/showoff.js
View
@@ -204,6 +204,7 @@ custom event:
* *showoff:show* will be triggered as soon as you enter a page
* *showoff:next* will be triggered when you switch to the next page
+* *showoff:incr* will be triggered when you advance to the next increment on the page
* *showoff:prev* will be triggered when you switch to the previous page
These events are triggered on the "div.content" child of the slide, so you must
View
@@ -283,7 +283,11 @@ function nextStep()
} else {
incrElem.eq(incrCurr).css('visibility', 'visible')
}
- incrCurr++
+ incrCurr++;
+ var incrEvent = jQuery.Event("showoff:incr");
+ incrEvent.slidenum = slidenum;
+ incrEvent.incr = incrCurr;
+ $(currentSlide).find(".content").trigger(incrEvent);
}
}

0 comments on commit df260ea

Please sign in to comment.