jquery Ready () bind () toggle () addclass () event handling
A function of the more commonly used dynamic effects provided in jquery. You can also add Parameters: Show (Speed,[callback]) displays all matching elements in an elegant animation, and optionally triggers a callback function when the display is complete.
Ready (FN)
Code:
JS Code
$ (document). Ready (function () {
Your code here ...
});
$ (document). Ready (function () {
Your code here ...
});
Role: It can greatly improve the response speed of Web applications. By using this method, you can immediately call the function you are binding when DOM loading is ready to be read and manipulated, and 99.99% of Web page effects functions need to be executed at that moment.
Bind (TYPE,[DATA],FN)
Code:
JS Code
$ ("P"). Bind ("click", Function () {
Alert ($ (this). text ());
});
$ ("P"). Bind ("click", Function () {
Alert ($ (this). text ());
});
Function: Bind an event handler function to a specific event (like click) for each matching element. Play the role of event monitoring.