Hi,
thanks for your post, and sorry for the trouble.
This essentially happens when you show more rows that fit on the page, or if the individual row height varies.
For a solution, please see https://wordpress.org/support/topic/scroll-to-top-14/
Regards,
Tobias
Thread Starter
LoriT
(@lteachum)
Hi Tobias!
I tried the suggestion and I even made the 2 changes you specified yet it still doesn’t work š
Also, now the default is to show only 10 rows and I have it checked to show 100 rows.
Any other ideas?
Thank you!
Hi,
I’m seeing an error message related to the first change from https://wordpress.org/support/topic/scroll-to-top-14/#post-14604911 (removing that one line) right now. Are you sure that that line has been removed?
Also, the second change doesn’t seem to have been performed?
Regards,
Tobias
Thread Starter
LoriT
(@lteachum)
That’s strange. ok.
I created a file ending in php. Pasted your code. Changed the lines you specified (see below).
I just reuploaded the file. Still doesn’t work. What else could it be? Here’s what I have in my file…
add_filter( ‘tablepress_shortcode_table_default_shortcode_atts’, ‘tablepress_add_shortcode_parameters_pagination_scrolltotop’ );
add_filter( ‘tablepress_table_js_options’, ‘tablepress_add_pagination_scrolltotop_js_options’, 10, 3 );
add_filter( ‘tablepress_datatables_command’, ‘tablepress_add_pagination_scrolltotop_datatables_command’, 10, 5 );
And at the bottom I have
{$name}.on( 'page.dt', function() {
setTimeout( function() {
$( document ).scrollTop( $( {$name}.table().container() ).offset().top );
}, 10);
} );
Hi,
when I open your link from above, I’m taken to a password-protected page.
At the bottom, I see an error message related to the tablepress_add_pagination_scrolltotop_js_parameter
function (which is from the first line to remove). In the page source, I can see the second line that needs a change. So, this all indicates that the PHP file still has the unmodified code.
Regards,
Tobias
Thread Starter
LoriT
(@lteachum)
ok, so I have no idea what happened, but strangely, the changes weren’t made to the file – you were right! I made the changes and it works now. Thank you so much!
Hi,
no problem, you are very welcome! š Good to hear that this helped!
Best wishes,
Tobias
Ā
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!