John Joseph Trovato
John Joseph Trovato

Reputation: 46

Toggle data-tooltips on and off with a button bootstrapTable 1.22

I'm looking to have a switch to toggle the tooltips on and off. I have a lot of them to explain each column and some cells within the table. While it's useful for users at first I can only imagine it being annoying after a while.

When the user toggles the switch the value will be saved into SQL and loaded each time to user logs on. Depending on the bit value 0/1 it will show or not show the tooltips as they hover over the column name. I have this code working.

This is one line from the table:

<th data-filter-control="select" data-sortable="true" data-field="sitename" data-width="150" data-tooltip="&quot;AD Site&quot; &#013;This is the AD Site Name in Sites and Services that this server matches.">AD Site Name</th>

I tried to change style sheet but that seems to be a lot of work and not sure that's the correct path to go down.

I have a single JS file i was hoping to add a function to basically enable it or disable based on the bit.

Upvotes: 0

Views: 25

Answers (0)

Related Questions