Home >Web Front-end >JS Tutorial >jQuery video tutorial courseware source code sharing
"jQuery Video Tutorial" Friends who are learning front-end are all familiar with jQuery. It is a simple JavaScript library that can quickly develop interactive animations. Through the study of this course, we can do more things with the least code, let's start learning together!
Course playback address: http://www.php.cn/course/205.html
The teacher’s teaching style:
The lectures are friendly and natural, unpretentious, not pretentious, nor deliberately exaggerated, but talk eloquently and carefully, and the relationship between teachers and students is In an atmosphere of equality, collaboration, and harmony, silent emotional exchanges are carried out, and the desire and exploration of knowledge are integrated into simple and real teaching situations. Students gain knowledge through quiet thinking and silent approval
The more difficult point in this video is the jQuery incident:
Introduction
The reason why jquery has become the most popular front-end library is largely due to Events that benefit from it have good semantics, excellent compatibility, and are easy to manage and extend.
Here I will introduce some basic usage of jquery events.
Implementation Principle
jquery events are derived from the browser's addEventListener (W3) and attachEvent (IE) methods, providing a consistent API across browsers. For specific implementation principles, please refer to Aaron’s series of articles
jquery source code analysis-events.
Event operation
Binding events
There are many ways to implement event binding in jquery, among which $(selector).event(func) method event supports a series of Browser events, document load events, form events, keyboard events and mouse events, but not all.
// 常用的写法$('body').click(function(){ }) $('body').on('click',function(){ }) $('body').one('click',function(){ }) // 只会执行一次,然后销毁事件 // 其他写法(不推荐) $('body').bind('click',function(){ }) $('body').delegate('p','click',function(){ })
Here we also recommend downloading source code resources: http://www.php.cn/xiazai/learn/2112
The resources are shared with everyone. Video courseware, ppt and source code
The above is the detailed content of jQuery video tutorial courseware source code sharing. For more information, please follow other related articles on the PHP Chinese website!