Abe Miessler
Abe Miessler

Reputation: 85056

Possible to scroll to a row in a table using jQuery?

I have a set of about 4000 records. I display 15 at a time in a table and I am curious if there is anyway to implement a "scroll animation" that would allow users to scroll to a specific position in the table?

For example if the user was viewing records 1-15 and they wanted to view the 2000-2015 records is there a plugin that would make the records appear to scroll down to that position.

Also, would doing this cause performance problems (since I would potentially be loading 4000 records)?

Upvotes: 0

Views: 1549

Answers (2)

Matt Ball
Matt Ball

Reputation: 359826

You've got two separate questions here.

First check out a grid plugin that can handle huge data sets. This is usually done with virtual rendering.
I like SlickGrid (among many other places, it's used to display query results in SEDE).

Then you can figure out how to scroll to a particular row, since this will almost certainly depend on the grid implementation itself.

Upvotes: 1

Marnix
Marnix

Reputation: 6547

Yes there is. You could think of also generating an anchor <a> per row, so you could just scroll to a specific place.

Here is a plugin that does that for you: http://plugins.jquery.com/project/ScrollTo

Upvotes: 2

Related Questions