Haroldo
Haroldo

Reputation: 37377

get jquery .load() to append rather than replace?

is this possible?

Upvotes: 0

Views: 156

Answers (2)

Ju Nogueira
Ju Nogueira

Reputation: 8461

I believe you have to use .get:

$.get('ajax/test.html', function(data) {
  $('.result').append(data);
});

http://api.jquery.com/jQuery.get/

Upvotes: 1

Fenton
Fenton

Reputation: 251062

You can use jQuery.get() to append data...

jQuery.get("URL", function(data) {
    jQuery("#myElement").append(data);
});

Upvotes: 1

Related Questions