Specific event handlers can be established using the following code:
$("a").click(function() {
// do something here
// when any anchor is clicked
});
The code inside function() will only run when an anchor is clicked. Some other common events you might use in jQuery include:
blur, focus, hover, keydown, load, mousemove, resize, scroll, submit, select.
$("a").click(function() {
// do something here
// when any anchor is clicked
});
The code inside function() will only run when an anchor is clicked. Some other common events you might use in jQuery include:
blur, focus, hover, keydown, load, mousemove, resize, scroll, submit, select.
No comments:
Post a Comment