i need to change background-color of a particular colum when the table header corresponding to that column is clicked.How to achieve this using html css & jQuery.
vinithawilson
0
Newbie Poster
Recommended Answers
Jump to Post$(document).ready(function(){ $('#BUTTON_ID').Click(function{ $('#the_element_ID').css('background-color','#put_your_color_here'); $(this).parent().css('background-color',$(this).attr('data-value')); }); });
that should do it.
All 4 Replies
imBaCodes
2
Junior Poster
vinithawilson
0
Newbie Poster
imBaCodes
2
Junior Poster
imBaCodes
2
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.