Filtering HTML results with jQuery and AJAX is simple, provided that you understand the basic principles behind the AJAX parsing of an HTML document. When you set the
dataType
parameter to html
using the $.ajax()
wrapper method, you're actually telling jQuery to return a full DOM structure that you can traverse with normal jQuery DOM methods. This is made possible by jQuery thanks to its internal selector engine that allows you to treat the returned HTML either as a string or as a DOM structure.
jQuery: filtering HTML results in AJAX
0