Стоит иметь в виду, что заголовок агента пользователя может легко фальсифицироваться. Я не полагался бы на него ни для чего важного.
If you wanted to just return that div you could use the load
method of jQuery to simply load the content returned into your #current-div
ala
$("a").click(function() {
/* grabs URL from HREF attribute then adds an */
/* ID from the DIV I want to grab data from */
var myUrl = $(this).attr("href") + " #external-div";
$("#current-div").load(myUrl);
return false;
});
Take a look at the jQuery Ajax/load documentation