Reputation: 11
I am using the following with JQuery 1.4.2 and it is working fine. However if i use Jquery 1.8.3 this stop working.
$(document).ready(function() {
$('.time-location').change(function(){
var from = $('.time-location').val();
var dataString = "&from=" + from;
$.ajax({
type: "GET",
url: "loadajax.php",
data: dataString,
success : function(data){
$('.world-time').show();
$('.world-time').html(data);
}
});
});
});
<div id="time-location-box">
<div class="world-time" id="world-time" >
<?php include('loadajax.php');?>
</div>
<div id="time-location-sel-box">
<select class="time-location" name="time-location" id="time-location">
<option value="America/New_York">Washington DC,US(EST</option>
<option value="America/New_York">NewYork, US(EST)</option>
<option value="America/Chicago">Chicago, US(CST)</option>
</select>
</div>
</div>
I also tried to change the success : function to done : function as it seems to be deprecated but it didn't helped.
Upvotes: 1
Views: 252