[Plugin: WP-Table Reloaded] Column tooltip
-
My table has too many columns for me to properly describe it in the <th> field, and I decided I wanted to display a ‘tooltip’ text helper when the user hovers over a particular column.
Sniffing in the source of my table inside a post, I discovered that each table cell helpfully already has a class defined:
<td class="column-1">row1column1data</td>
Just by adding the following to the css I was able to make my complete 5th column nice and red
.column-5 {background-color: #FF0000!important;}
So, now to add the tooltip css:.column-5 { background-color: #FF0000!important; position:relative; /*this is the key*/ z-index:24; background-color:#ccc; color:#000; text-decoration:none} } .column-5:hover{z-index:25; background-color:#ff0} .column-5 span{display: none} .column:hover span{ /*the span will display just on :hover state*/ display:block; position:absolute; top:2em; left:2em; width:15em; border:1px solid #0cf; background-color:#cff; color:#000; text-align: center}
(borrowed from https://psacake.com/web/jl.asp)
Now all I need to do is add the <span> tooltip within the cell markup as in<td class="column-5">cellcontent<span>tip</span></td>
…and this is where it all goes wrong – there is no markup like that, because all the classes are created on the fly!
Ummm…. any suggestions?!https://www.ads-software.com/extend/plugins/wp-table-reloaded/
- The topic ‘[Plugin: WP-Table Reloaded] Column tooltip’ is closed to new replies.