What is the best way to replace <table> with a new one using jQuery? I use ajax on the page to get new data.
<table>
If you don't want to add a shell element, something like this should work:
$.ajax({ url: 'yoururl.php', success: function(r) { $('table#something').replaceWith(r); } });
.. assuming the answer you received is an element of a table.
Wrap it in a div and:
$("#myDiv").load("/some/url.php"); // where url.php outputs the entire table
You can specify the part of the remote document to be inserted by placing it in the selector with the URL parameter as follows:
$("#myDiv").load("/some/url.php #myTable");
Source: https://habr.com/ru/post/1301562/More articles:Why does the bitwise AND of two short values โโresult in an int value in Java? - javaSend url with querystring with SmtpClient - c #Can we automate an application available in the neighborhood of Citrix? - testingPHP - Extracting text from HTML - htmlhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1301561/anchor-tags-to-plain-text-within-content&usg=ALkJrhhtgJ7z05LItkHRFt_lB5kFdjurjQJava claims unpleasant side effect - compiler error? - javaHow to get class file using Eclipse? - javahow to change loaded stylesheet after initializing ckeditor - ckeditorASP.NET MVC Routing: good style to use QueryStrings? - .netSearch for advanced pagination php / mysql script - phpAll Articles