Sometimes before, I use the function .load()
as
// document load
$(document).load(function() {
// ... code ...
});
but now, its doesn't work.
I just use the function .ready()
// document ready
$(document).ready(function() {
// ...code...
});
the function .load() is used as a part of ajax now.
I remember that there is something defferent between the two function.Now canceled the .load(), are there the same ?
The code as:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<script type="text/javascript" src="jquery-2.2.3.js"></script>
<script>
$(document).ready(function() {
console.log("ready");
});
$(document).load(function() {
console.log("load");
});
</script>
</head>
<body>
</body>
</html>
and the console shows : "ready"
the function .load() doesn't work!