January 2016
Beginner
188 pages
3h 22m
English
Let's discuss jQuery functions/methods that we use frequently in detail.
All the methods should be written in the ready() function. Some of the commonly used methods are as follows:
Using this method, you can load a file on your browser. Consider that you want to fetch some text from a .txt file on your browser. You can do the following coding:
<html>
<head>
<script type="text/JavaScript" src="jquery.js"></script>
</head>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#click").load("test.txt");
});
});
</script>
<body>
<div id="click">
Hello;
</div>
<button type="button" name="button">Click to replace "Hello" from text file</button>
</body>
</html>Read now
Unlock full access