I have created anonymous function to load my data via ajax. Here is my code :-
jQuery(function(){
jQuery("[data-load]").each(function(){
jQuery("#"+jQuery(this).data('area')).load(jQuery(this).data("load"), function(){alert( "Load was performed." );});
});
});
Here is my HTML Code :-
<div data-load="header.php" data-area="_page_1">
<span id="logo">Travel</span>
<span id="_page_1">Link_1 Link_2</span>
</div>
I am using ajax load
function :- http://api.jquery.com/load/
Thanks