I have 10 Button with different values in html ..
<button class="btn btn-warning" name="table_no" value="2" id="tblidno2">2</button>
<button class="btn btn-warning" name="table_no" value="3" id="tblidno3">3</button>
<button class="btn btn-warning" name="table_no" value="5" id="tblidno5">5</button>
<button class="btn btn-warning" name="table_no" value="8" id="tblidno8">8</button>
<button class="btn btn-warning" name="table_no" value="3" id="tblidno3">3</button>
<button class="btn btn-warning" name="table_no" value="2" id="tblidno2">2</button>
<button class="btn btn-warning" name="table_no" value="7" id="tblidno7">7</button>
<button class="btn btn-warning" name="table_no" value="4" id="tblidno4">4</button>
<button class="btn btn-warning" name="table_no" value="6" id="tblidno6">6</button>
<button class="btn btn-warning" name="table_no" value="4" id="tblidno4">4</button>
and one Input box ,
<input type="text" name="given_tblno" id="given_tblno" value="6" />
Whenever i change ( using OnChange Event) value in input box of given_tblno i want to disable all buttons with a condition given as,
$a=$('#given_tblno').val();
$b=$('#tblidno').val(); // Need to check Each and every Button values using any loop
if($a<$b)
{
//....Here i want Disable buttons when condition is true....
}
So here in my example when this condition true buttons will be disabled where the values are occurred in buttons 2,3,5,3,2,4,4 .. Only 8,7,6 values has buttons it should be enabled for click actions.
Using Jquery i wanted to do .