I want to set the color of tab when I click on it. My code is :
<div id="tabs">
<ul>
<li><a href="#tabs-1">Tab-1</a></li>
<li><a href="#tabs-2">Tab-2</a></li>
<li><a href="#tabs-3">Tab-3</a></li>
<li><a href="#tabs-4">Tab-4</a></li>
<li><a href="#tabs-4">Tab-5</a></li>
</ul>
<div id="tabs-1">
<p></p>
</div>
<div id="tabs-2">
<p></p>
</div>
<div id="tabs-3">
<p></p>
</div>
<div id="tabs-4">
<p></p>
</div>
<div id="tabs-5">
<input type="hidden" id="hidden" value="1"/>
</div>
</div>
How to do it?
var value= "#ui-id-";
var nithin = value +''+ $('#hidden').val();
$(nithin).click(function () {
$(nithin).css('background','red');
var hidden=(parseInt('#hidden').val())+1;
$('#hidden').val(hidden);
});