Is it better to use
$.get("http://www.example.com/mydirectory", function(data) {
$(".someclass").html(data);
});
or
$('.tripPlannerBottom').load("http://www.example.com/mydirectory");
any speed or performance benefits?
Is it better to use
$.get("http://www.example.com/mydirectory", function(data) {
$(".someclass").html(data);
});
or
$('.tripPlannerBottom').load("http://www.example.com/mydirectory");
any speed or performance benefits?
I have no benchmark data to back my claim up, but by looking at the source, $.get + html() and .load() are basically the same. .load() is a convenience wrapper around .get() + html()
.load, .get & .post are wrappers around the .ajax method. There is no performance boost apart from few chars you save in typing without having to create the settings if using the .ajax method.