简体   繁体   中英

Can I expand/collapse a table in MVC?

I have a table and would like to give an option of whether you want to expand or collapse. If possible, I would also like to show the first 5 records in the table. I can make two separate tables and toggle, yes, but is there a more efficient way?

You can do this with JQuery easily by hiding/showing rows of the table. See this post toadd a row with jQuery and this one for expanding and collapsing table rows .

The second link is no longer at this website. After doing a little searching on it, I found no new link. It appears to be deleted.There was nothing on the web page in the tutorials for jquery either. Apparent last post on this site is from 2017. Doesn't appear this is a good source anymore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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