Disable Hover on the whole table

Disable Hover on the whole table

ArgaWoWArgaWoW Posts: 14Questions: 5Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Hi,

is there a Way to disable the hover for the datatable?

Thanks for help

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hover? Do you mean the background of the table body rows changing as you hover over them? Or a tooltip or something else? Also are you using a styling integration such as Bootstrap or something else? It would be really useful if you could link to a test case showing the issue with a full description of what you are looking to do.

    Thanks,
    Allan

  • ArgaWoWArgaWoW Posts: 14Questions: 5Answers: 0
    edited October 2022

    Hi Allan,
    yes I mean the hover effect on the row. In one special case I have a table with only one record/row. No user interaction is required so I don’t want to have the hover effect.
    The html Part don’t have the table-hover attribute.
    I will make a example as soon as possible. I am very busy these days.

    Thanks you very much
    Andreas

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Not sure what styling framework you are using, so I'm going to assume you are using the DataTables default. In which case rather than using the display class for the table, use stripe row-border order-columns. See the docs for details.

    Allan

  • ArgaWoWArgaWoW Posts: 14Questions: 5Answers: 0

    Hi Allen,
    this don't work for me.

    This css do the trick in my case:

    #tableSubs>tbody>tr:hover>* {
        box-shadow: inset 0 0 0 9999px white;
    }
    

    Thanks for your assist :smile:

Sign In or Register to comment.