Я пытаюсь изменить этот mootools на jquery, но я не могу найти эквивалент, проблема в строке: onSuccess: function (texto, xmlrespuesta) {$ ('divrespuesta2'). Set ('html', текст);
Motools
function searchTopics(){
document.getElementById("divrespuesta3").innerHTML="";
document.getElementById("divInicio").innerHTML="";
buscador = $('txtbuscar').value;
var nuevoRequest = new Request({
method: 'POST',
url: '../path/controller.php',
data: 'search='+search,
onRequest: function() {$('divrespuesta2').innerHTML="Cargando...";},
onSuccess: function(texto, xmlrespuesta) {$('divrespuesta2').set('html',texto);
}
jQuery
function searchTopics(){
$('#divrespuesta3').html("");
$('#divInicio').html("");
buscador = $('#txtbuscar').val();
$.ajax({
type: "POST",
url: '../path/controller.php',
data:'search='+search,
beforeSend:function(){},
success: function(response){
$('#divrespuesta2').set('html', response);
}
});
}