get document title with jQuery
<p>I have to get document title from ajax success data without regex . For example this is not working: <a href="http://jsfiddle.net/7UyRa/" rel="nofollow">http://jsfiddle.net/7UyRa/</a></p>

<pre><code>$(function() {
    $.ajax({
        url: 'http://somesite.com',
        success: function(source) {

            var title = $(source).attr('title');

            //or

            var title = $(source).find('title').text();

            console.log(title);
        }
    });
 });
</code></pre>

<p>It returns 'undefined'</p>
