Thursday, 15 March 2012

Can I reload selector data from server without page refresh in jquery? -



Can I reload selector data from server without page refresh in jquery? -

i want refresh 1 element on page, load element html server, don't want refresh page , reload it. can that? think, load function it, mat can advice me more way?

there many ways load info server without refreshing page using jquery ajax , yes load 1 method among many; example, if want load info on click event of button may utilize loke this:

$(document).ready(function(){ $('#button_id').on('click', function(e) { e.preventdefault(); // required if clicked element link $( "#result_div" ).load( "some_page.html"); }); });

check more on jquery website. check get/ajax method this:

//... $.get('some_page.html', function(response) { $('#result_div').html(response); });

jquery

No comments:

Post a Comment