Jump to content

toggle


mynamesleo

Recommended Posts

Hi,

I am using the following JS function (found from google) to hide/show table rows

[code]
{
var tr = document.getElementById(id);
if (tr==null) { return; }
var bExpand = tr.style.display == '';
tr.style.display = (bExpand ? 'none' : '');
}[/code]

It works great, but is there a way to set the rows as hidden by default? as when the page is visited all rows are visible/open.

Thanks
Link to comment
https://forums.phpfreaks.com/topic/28084-toggle/
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.