Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: target_file,
- beforeSend: function(){
- // triggered before the ajax-call is made
- }
- }).done(function(data){
- // triggered when ajax-call is done, the loaded file is stored in data-variable
- // load specific element (content) from the data into specific element (container):
- $("#container_element").html($(data).find('#content_element'));
- }).fail(function(){
- // triggered when error during ajax-call
- }).always(function(){
- // always triggered, no matter if success or fail
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement