Jump to content

collapse all table upon load


simpli

Recommended Posts

Hi,

I have a table where I load several tbodys (one for each user in my database). On click on the first row of the table, the below tbody collapses. That works fine. Currently, when the page loads however the whole detail is shown for everyone. I would like my table to show in the collapse state when the users come in and then they can choose which section they want to expand. I built a javascript that hides each tbody. I tried calling it plain from my php:

HideTable("tb_" . $currentparticipant);

 

It of course didn't work as it said that the function is not defined (normal I am calling a js function from phscript). My question is: Which event handler could I hook into to hide each tbody of the table when I'm done loading my dynamic data into it? Do you have any suggestions?

 

Thanks,

J-R

Link to comment
https://forums.phpfreaks.com/topic/152649-collapse-all-table-upon-load/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.