Thanks Guys !!!
<ul data-role="controlgroup" data-type="horizontal" class="localnav">
<li><a href="#" data-role="button" data-transition="fade" id="id1" data-theme="g">N/A</a></li>
<li><a href="#" data-role="button" data-transition="fade" id="id2" data-theme="h">OK</a></li>
<li><a href="#" data-role="button" data-transition="fade" id="id3" data-theme="i">TBC</a></li>
<li><a href="#" data-role="button" data-transition="fade" id="id4" data-theme="j">No</a></li>
</ul>
This is my widget ...Horizontal buttons group of 4 buttons ...
When one button is selected, that needs to be highlighted with a specific color and others not highlighted.
eg :- selecting id1 should show gray colour , others not highlighted
selecting id2 should show green colour , others not highlighted
selecting id3 should show yellow colour, others not highlighted
selecting id4 should show red colour, others not highlighted
code :
Trying to work with custom theme from g to j and trying but not working ....
$('#id1').click(function () {
$(this).attr('data-theme', 'g');
$("#id2").attr('data-theme', 'c');
$("#id3").attr('data-theme', 'c');
$("#id4").attr('data-theme','c');
});
$('#id2').click(function () {
$(this).attr('data-theme', 'h');
$("#id1").attr('data-theme', 'c');
$("#id3").attr('data-theme', 'c');
$("#id4").attr('data-theme','c');
});
$('#id3).click(function () {
$(this).attr('data-theme', 'i);
$("#id2").attr('data-theme', 'c');
$("#id1").attr('data-theme', 'c');
$("#id4").attr('data-theme','c');
});
$('#id4).click(function () {
$(this).attr('data-theme', 'j');
$("#id2").attr('data-theme', 'c');
$("#id3").attr('data-theme', 'c');
$("#id1).attr('data-theme','c');
});