I have this jquery code but its not working for some reason i tested the code in JSFiddle works fine why is not working in my page. I google similar problems but none of them help me identify the issue.
I added Jquery on the head part as
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-latest.min.js"></script>
Here is html part
<select id="2t2" style="">
<option value="0"></option>
<option value="1">1%</option>
<option value="2">2%</option>
<option value="3">3%</option>
<option value="4">4%</option>
<option value="5">5%</option>
</select>
<select id="2t3" style="">
<option value="0"></option>
<option value="1">1%</option>
<option value="2">2%</option>
<option value="3">3%</option>
<option value="4">4%</option>
<option value="5">5%</option>
</select>
Here is Jquery code
<script type='text/javascript'>
var i=$('#2t2'),x=$('#2t3'),a,b;
$(i).change(function(){
a=i[0]; b=x[0];
if(a.selectedIndex>b.selectedIndex) {
b.selectedIndex = a.selectedIndex;
}
});
$(x).change(function(){
a=i[0]; b=x[0];
if(b.selectedIndex<a.selectedIndex) {
a.selectedIndex = b.selectedIndex;
}
});
</script>