BasilFawlty001
asked on
Hide or remove table row attributes when there are no id tags.
How can I hide an HTML table attribute when the table has no ID? I do not have access to the template that generates the table but I can add scripting and CSS to the page.
I'm using a system where empty tables are written to a web page. Each table has multiple rows (tr height="85"). I would like to replace or remove the height attribute. A height of 85 is specific to this table. There are multiple rows in the table, so the solution would need to hide or replace each row where height="85" on the page.
I tried replaceWith in a few variations but I'm not a coder so it's probable that I didn't do it right. Thanks for your suggestions!
I'm using a system where empty tables are written to a web page. Each table has multiple rows (tr height="85"). I would like to replace or remove the height attribute. A height of 85 is specific to this table. There are multiple rows in the table, so the solution would need to hide or replace each row where height="85" on the page.
I tried replaceWith in a few variations but I'm not a coder so it's probable that I didn't do it right. Thanks for your suggestions!
ASKER
Thanks, Juana.
Unfortunately, the table and row have no id. It's very frustrating but I have no control over that so all I can do is try to modify the attributes after the fact.
Unfortunately, the table and row have no id. It's very frustrating but I have no control over that so all I can do is try to modify the attributes after the fact.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Julian. You're my hero. Worked like a charm.
Thank You!
Thank You!
You are welcome.
You can hide or change the height of all the elements with an id.
Open in new window
This is an example I made for you