I have a jQuery ajax get that will return an html text. From this one I need to extract the h3 element (with id='title') value: THIS IS TITLE.
Can I achieve this with jQuery?
<div class="content">
<h3 id="title">THIS IS TITLE</h3>
.....
</div>
and here is the call:
$.ajax({
url: url,
type: 'GET',
cache:false,
success: function (data) { // data is the html text returned
alert('The title is: ' + TITLE HERE);
}
});
$(data).find('#title').text()