How to wait for data loading after the load function? small example:
$("#hideitem").load(link); alert($("#hideitem").html()); // здесь пока пусто, нужно подождать. как это сделать? How to wait for data loading after the load function? small example:
$("#hideitem").load(link); alert($("#hideitem").html()); // здесь пока пусто, нужно подождать. как это сделать? Once you have found the load method, you could see that it looks like this:
.load(url,[data],[callback],[dataType]): and that he can write a callback function as the third parameter, which will be called after the html-text sent by the server is placed on the selected page elements. Sobssn it and you need to write and use.
Example:
$("#result").load( "ajax/test.php", { param1: "param1", param2: 2 }, function(){alert("Получен ответ от сервера.")} ); jquery load s018.radikal.ru/i518/1702/78/1a071a061d9c.jpg JQuery docks in English, in Russian and in W3S ¯ \ _ (ツ) _ / ¯ - Alexey Shimanskyjquery load wait and see where you go ... - perfectSource: https://ru.stackoverflow.com/questions/623916/
All Articles