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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -