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()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With