jquery - Bootstrap Table - To change the background color row -


i need change background color row, not working well.

this js code:

$("#table-results").bootstraptable({      method: 'get',     url: '/json/data-results.json',     columns: [{         field: 'type'        }, {         field: 'customer_name'     }, {         field: 'address'     }, {         field: 'img',         align: 'center'      }],     onloadsuccess: function(res) {         $("#table-results").on('click-row.bs.table', function (e, row, $element) {             $($element).addclass('danger');         });     }    }); 

other way (but not working)

$("#table-results").bootstraptable({      columns: [{         field: 'type'        }, {         field: 'customer_name'     }, {         field: 'address'     }, {         field: 'img',         align: 'center'      }],     onclickrow: function (row, $element) {         $($element).addclass('active').siblings().removeclass('active');         //$($element).addclass('danger');     } }); 

this css code:

.danger {     background-color: red !important; } 

which problem?, thanks,


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -