Forward/Next Script for jQuery Tools Tabs

Make forward and next buttons or links on each tab view. In the rel tags of each button, place the id of the tab that would be next or before in the sequence.

<button rel="#tab1">&nbsp;</button>
<button rel="#tab3">&nbsp;</button>

Then, use this handy little script:

$('.nav_arrow').click(function () {
var nextPage = $(this).attr('rel');
$(nextPage).click();
return false;
});

Effectively, you are telling the forward or next button that if it’s clicked, cause the corresponding tab to be clicked, opening that view.

This entry was posted in jQuery. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>