Jquery table column sliding effect

2019-04-08 09:49发布

问题:

I will need a Jquery script for a table sliding effect just like

http://sfsdirectdemo.projects.sourceflow.com/luke (middle plan table)

I Google it but have not any good result, anyone please help.

回答1:

Here's an example that I believe does what you want:

http://jsfiddle.net/nheldman/GB7Hc/3/

The trick is to create an outer div with the width of the table you want to show, and an inner div that is the width of all of the columns that could be displayed if you slide.

Then you can just use jQuery animate() to scrollLeft the outer container by the width of each column.

Good luck!



回答2:

I had to do a very similar thing at one point. Here is a jsfiddle that I used to figure out the code. Hop it helps. http://jsfiddle.net/mstarkman/U7JHM/9/