Permalink
Browse files

additional navigation

  • Loading branch information...
1 parent 366f253 commit 75c38aa09833c58b5adc0ae9c3e31ed14e175249 Wojciech Ryrych committed Sep 21, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 widget/lib/jquery.ui.rlightbox.js
View
16 widget/lib/jquery.ui.rlightbox.js
@@ -362,6 +362,22 @@ $.extend($.ui.rlightbox, {
// close the lightbox upon clicking on the close button and the overlay
$lb.close.add( $lb.overlay ).click( $.proxy(this.closeLightbox, this) );
+
+ // goes to the next element when button is clicked
+ $lb.next.click(
+ function() {
+ data.side = "right";
+ self.navigationNext.apply( self );
+ }
+ );
+
+ // and goes to the prev element when prev button is clicked
+ $lb.prev.click(
+ function() {
+ data.side = "left";
+ self.navigationNext.apply( self );
+ }
+ );
// highlight buttons when mouse hovers over them
$lb.next

0 comments on commit 75c38aa

Please sign in to comment.