(Sorry about my english, it aint my birth lang) I have a project that uses codeigniter+JqueryUI. I was thinking about upgrading JQuery version to 1.5 mainly because I am using a lot of ajax calls, and any improvement in speed is highly appreciated. So this is my code, wich works fine in JQuery version 1.4.4:
$("#nome_produto").autocomplete({
source: function( request, response ) {
$.ajax({
async:false,
url: "<?php echo site_url("produtos_produto/json_produtos/f") ?>",
dataType: "json",
type: "POST",
data: request,
success: function( data ) {
response( $.map( data, function( item ) {
return {
label: item.label,
value: item.label,
cod: item.cod
}
}));
},
beforeSend:function(){
$("#nome_produto").toggleClass("loading");
},
complete:function(){
$("#nome_produto").toggleClass("loading");
}
});
},
minLenght:3
});
In Jquery 1.5, I got a 404 error, but the url requested is this: http://myurl.com/produtos_produto/json_produtos/f?callback=JQUERY_hashofnumbers, even though this is a post request. Does anyone knows why it happens?