I am looking for a solution to get a class element from HTML stored in var.
I am making an AJAX request that returns the contents of the HTML to me (the "data" argument of the next callback).
$.get(form_action, form_data, function(data){
How can I do something like .hasClass for data to find out if the HTML content matches the .alert class?
I tried '$ (data) .hasClass' and 'data.hasClass', of course, did not work. Any idea?
Antoine
source
share