Hi,
in this blog you will learn how the load function in jquery, Used to fetch data from any server to any web page using selectors.
<p><script>
$(document).ready(function(){
$("button").click(function(){
$("#div2").load("your_text_file.txt");
});
});
</script></p>
This script is also used to load function by calling the url/name of the target file.
But just before this function you need to set the position on which the data will popup. Lets create a div give name "div2", And you can see exp $("div2") showing position of remote data.
<div id="div2"><h2>Portion below this line will show the server page data.</h2></div>
<button>show data</button>
Since this is google product all you need to call the CDN jquery .
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"> </script>
0 Comment(s)