Posted on January 18, 2012 by Michael Rosario
Total Posts: 33 | Join date: 03-12-11
<select name="tourdate" class="TourDate">
<option>Date 1</option>
<option>Date 2</option>
<option>Date 3</option>
</select>
<select name="tour alt" class="TourAlt">
<option>Date 1</option>
<option>Date 2</option>
<option>Date 3</option>
</select>
<script>
$(document).ready( function(){
var item1 = "";
var item2 = "";
$('.TourDate').change(function() {
item1 = $("select[name='tourdate'] option:selected").text();
$("select[name='touralt'] option").each(function () {
if(item1 == $(this).text()){
$(this).attr("disabled","disabled");
} else {
$(this).removeAttr("disabled");
};
});
});
$('.TourAlt').change(function() {
item2 = $("select[name='touralt'] option:selected").text();
$("select[name='tourdate'] option").each(function () {
if(item2 == $(this).text()){
$(this).attr("disabled","disabled");
} else {
$(this).removeAttr("disabled");
};
});
});
});
</script>]
Tags: There are no tags for this entry.