Getting <title> tag from HTML page using $.ajax()

Getting <title> tag from HTML page using $.ajax()

I have a URL (var spUrl) and I am trying to get the <title> of the page at that location.  I am using $.ajax() to pull the page and process the <title> tag from the response $(data).  For some reason, Opera is able pull the title from the <title> tag, but no other browsers are able to do so.  When I modify the code to pull the <h2> tag instead of the <title> tag, it works in all browsers.

Here is an abbreviated version of the code:
  1. $.ajax({
    url: spUrl,
    async: true,
    success: function(data) {
    var spUrlTitle = $(data).find('title').eq(0).text();
    if (spUrlTitle != "") {
    $('ul#suggested-pages>li.in-progress a[href="'+spUrl+'"]').html(spUrlTitle);
    [...]
    }
    else {
    [...]
    }
    [...]
    },
    error: function() {
    [...]
    }
    });
















I don't have a working demo online but will be able to provide if it would help.