I found out that is same either anyway.
$(document).ready(function() {
// Handler for .ready() called.
});
Which is equivalent to calling:
$(function() {
// Handler for .ready() called.
});
so, I will use shorter one.
Applied to the Hello Jquery!.
$(function() {
$("a").click(function() {
alert("Hello Jquery!");
});
});
refer from : http://api.jquery.com/ready/
No comments:
Post a Comment