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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.