Dear Sir/Madam
please refer
We are listing Activity (Each activity has 2 options Yes , No)
viz
Income Tax has 2 options Yes or No
GST has 2 options Yes or No
------------------------------------------------------------------------------------
when clicked on Option No
We want to change
1. for item clicked we want to (NO is clicked)
- color of the text to white
- background color to #9C1041
2. For Option Yes (currently green background and white text)
we want to change to
- color of the text to #222
- background color to #fff (white)
Jquery used
when option NO is clicked
following function is called after updating database table
(the database table is properly updated)
- $('#updatediv'+updatedivid).load(url,data,servicedivcolorno(onlyid, thisid)) ;
We are displaying the values passed
- function servicedivcolorno(onlyid, thisid){
- alert('function servicedivcolorno values passed'+onlyid+' thisid='+thisid);
-
- $('#'+thisid).css("background-color", '#9C1041');
- $('#'+thisid).css("color", '#fff');
-
- $('#servicedivyyes'+onlyid).css('background-color', '#fff');
- $('#servicedivyes'+onlyid).css('color', '#222');
- }
when option YES is clicked
following function is called after updating database table
(the database table is properly updated)
- $('#updatediv'+updatedivid).load(url,data,servicedivcoloryes(onlyid, thisid)) ;
We are displaying the values passed
- function servicedivcoloryes(id, thisid)
- { alert('function servicedivnocolor YES values passed'+id+' thisid='+thisid);
-
-
- $('#'+thisid).css('background-color', '#086223');
- $('#'+thisid).css('color', '#fff');
- $('#servicedivno'+id).css('background-color', '#fff');
- $('#servicedivno'+id).css('color', '#222222');
- }