简体   繁体   English

动态添加一列并隐藏第一列,如jquery滑块

[英]adding a column dynamically and hiding the first column like jquery slider

I have a html page with 10 columns but I don't have show all in same page instead I have to show only 4 column moreover I have to render those column on a button click call add column. 我有一个包含10列的html页面,但是我没有在同一页面中全部显示,而是只显示4列,而且还必须在按钮单击调用添加列上呈现这些列。 What is the best approach to render 1-4 column first ? 首先渲染1-4列的最佳方法是什么? Fist column render first and on clicking button say add will render 2nd column , than 3rd and fourth. 第一列首先渲染,然后单击按钮说添加将渲染第二列,而不是第三和第四列。 Now when i will load 5th column ...I will have to hide 1st column so that i will accommodate 4 columns but data inside that column will stay ....my limit is to show 4 column at a time and hiding leftmost .... 现在,当我将加载第5列时...我将不得不隐藏第1列,以便我可以容纳4列,但该列中的数据将保持不变。.我的限制是一次显示4列并隐藏最左端.. ..

any helpful javascript or jquery advice will be appreciated ..thanks! 任何有用的JavaScript或jQuery的建议将不胜感激..谢谢!

yes i think this plug-in can solve your problem....through it you can show and hide your column on click of button...just have a look on it...even i have done the same thing on my page... Data Table 是的,我认为该插件可以解决您的问题。...通过它,您可以在单击按钮时显示和隐藏列...只要看一下...即使我在页面上也做了同样的事情... 数据表

And here is your Working example.... Show and hide Column Dynamically 这是您的工作示例。... 动态显示和隐藏列

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM