Skip to content

Commit 774fad6

Browse files
committed
Add events to observe guider prev/next navigation.
1 parent b9a5ce2 commit 774fad6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

guiders.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,9 @@ var guiders = (function($) {
523523
return guiders.next();
524524
}
525525
else {
526+
// Trigger before show to allow observers to change the
527+
// DOM before the new guider calculates its position
528+
$("body").trigger("guidersNext");
526529
guiders.show(nextGuiderId);
527530
return guiders.getCurrentGuider();
528531
}
@@ -552,6 +555,11 @@ var guiders = (function($) {
552555
if (prevGuider && prevGuider.highlight) {
553556
guiders._dehighlightElement(prevGuider.highlight);
554557
}
558+
559+
// Trigger before show to allow observers to change the
560+
// DOM before the new guider calculates its position
561+
$("body").trigger("guidersPrev");
562+
555563
guiders.show(prevGuiderId);
556564
return myGuider;
557565
}

0 commit comments

Comments
 (0)