Highlight row on click using jquery

If you want to highlight a row on click, include jquery js at your head tag and add following...


<style type="text/css">
    
    tr.walkRows td {
       background: #D7DF23;
    }  


</style>

<script type="text/javascript">
 $(document).ready(function() {
$('tr').click(function () {
     $(this).toggleClass('walkRows');
    });  
 });
</script>

Comments

Popular posts from this blog

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'

Upload csv file at Google Cloud Storage using java

Read Images from a xlsx file using Apache POI