Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deactivate hover state on table rows in Bootstrap Table

Is there a way to deactivate the hover state on table rows in Bootstrap Table?

It automatically set's it there...

like image 886
eco Avatar asked May 15 '26 17:05

eco


2 Answers

The default CSS class of the table is 'table table-hover'. Simply remove the table-hover class to remove the effect.

You can remove the hover effect globally for all tables: http://jsfiddle.net/e3nk137y/1437/

$.extend($.fn.bootstrapTable.defaults, {classes:'table'});

For a single table, you can set data-classes="table": http://jsfiddle.net/e3nk137y/1436/

<table id="table" data-classes="table">
like image 103
Kobi Avatar answered May 19 '26 01:05

Kobi


If you want to remove the hover effect while retaining the table borders:

$.extend($.fn.bootstrapTable.defaults, {classes:'table table-bordered'});
like image 27
Peter Palvolgyi Avatar answered May 18 '26 23:05

Peter Palvolgyi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!