You can use replaceWith (see: http://api.jquery.com/replaceWith/)
Like: $('#products').replaceWith(response);
More Related Contents:
- How to send data to the server via Ajax?
- HTML: how refresh information in [closed]
- “Mixed content blocked” when running an HTTP AJAX operation in an HTTPS page
- how to assign javascript variable value to php variable
- How to replace the entire html webpage with ajax response?
- jQuery append function is just appending the html but not the classes related to it
- How to hide css and js version details from weppalyzer in PHP
- Displaying selected dropdown option [closed]
- How to make page loaders/animations/transitions
- How could I make a calendar? [closed]
- HTML Form Submit pass array to PHP [closed]
- How to receive special character?
- Dynamic page load can’t load Java with page
- jQuery AJAX file upload PHP
- Why is it a bad practice to return generated HTML instead of JSON? Or is it?
- How to show progress bar while loading, using ajax
- jQuery AJAX form using mail() PHP script sends email, but POST data from HTML form is undefined
- pdf file upload ajax html
- Javascript regex returning true.. then false.. then true.. etc [duplicate]
- Populating a select box using JQUERY, AJAX and PHP
- How to generate a thumbnail image after adding an image inside an input type=”file” in a form and submitting them both on the same form
- html download attribute redirects to url instead of downloading
- How can I get all a form’s values that would be submitted without submitting [duplicate]
- When loading an html page via ajax, will script tags be loaded?
- Passing JSON data from php to html-data attribute and then to Javascript
- How do I refresh a DIV content?
- Send form data using ajax
- How do I execute a PHP query on select option choice using AJAX?
- XMLHttpRequest; Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource [duplicate]
- Parsing returned HTML from jQuery AJAX request