I have added jquery tabs with next previous buttons. I am facing the problem as i have added the next/previous buttons at the end of the page.When i click on next/previous button, it does not take to the top of the page. here is the code that i am using.
jQuery(function($) {
var $tabs = $('#tabs').tabs();
$(".ui-tabs-panel").each(function(i){
var totalSize = $(".ui-tabs-panel").size() - 1;
if (i != totalSize) {
next = i + 1;
$(this).append("<div class='next_button'><a href='#' class='next-tab mover' rel='" + next + "'>Next</a></div>");
}
if (i != 0) {
prev = i-1;
$(this).append("<div class='prev_button'><a href='#' class='prev-tab mover' rel='" + prev + "'>Back</a></div>");
}
});
$('.next-tab, .prev-tab').click(function() {
//$tabs.tabs('select', $(this).attr("rel"));
$tabs.tabs( "option", "active", $(this).attr("rel") );
return false;
});
});
I want that on clicking on next/previous button, it shall take me to the top of next tab/page..