≡
×
Plus
Manual
Examples
Reference
Download
Blog
Community
Support
sScrollY and Paginate: scroll to top after page change
sScrollY and Paginate: scroll to top after page change
beginner_
Posts: 55
Questions: 2
Answers: 0
May 2011
edited May 2011
in
General
Hi all,
have another short question. If I use sScollY and Pagination, how can I make the scroll slider jump to the top after changing a page?
Replies
beginner_
Posts: 55
Questions: 2
Answers: 0
June 2011
[code]
$(document).ready(function() {
var oldStart = 0;
$('#result').dataTable( {
//here is our table defintion
"fnDrawCallback": function (o) {
if ( o._iDisplayStart != oldStart ) {
$(".dataTables_scrollBody").scrollTop(0);
oldStart = o._iDisplayStart;
}
}
[/code]
This discussion has been closed.
Replies
$(document).ready(function() {
var oldStart = 0;
$('#result').dataTable( {
//here is our table defintion
"fnDrawCallback": function (o) {
if ( o._iDisplayStart != oldStart ) {
$(".dataTables_scrollBody").scrollTop(0);
oldStart = o._iDisplayStart;
}
}
[/code]