Home > Web Front-end > JS Tutorial > body text

Geek Academy jquery zero-based entry video material sharing

巴扎黑
Release: 2017-08-30 10:30:06
Original
1613 people have browsed it

jQuery is a fast and concise JavaScript framework. It is another excellent JavaScript code library (or JavaScript framework) after Prototype. The purpose of jQuery's design is "write less, do more", which means writing less code and doing more things. It encapsulates common JavaScript function codes, provides a simple JavaScript design pattern, and optimizes HTML document operations, event processing, animation design and Ajax interaction.

"Geek Academy jquery zero-based introductory video tutorial" explains it completely from the basics, mainly including the following content: 1. jQuery selector 2, jQuery event 3, jQuery Dom operation 4, jQuery animation 4, jQuery and ajax 5. Practical examples

Geek Academy jquery zero-based entry video material sharing

Video playback address: //m.sbmmt.com/course/207.html

The difficulty in learning this video is:

1 How to pass parameters in jquery binding events

$("#btn").bind("click",{"id":"111","name":"aaa"}, getData);  
  
function getData(d) {  
    alert(d.data.id);  
    alert(d.data["name"])  
}
Copy after login

2 How to call object methods in setTimeout

setTimeout(    function(self) {      return function() {
        alert(self);//这里面用self代替this      }
    }(this), 1000);
Copy after login

3 this and $( The difference between this)

Concept:
This indicates that the current context object is an html object, and you can call the properties and methods owned by the html object. $(this), the context object represented is a jquery The context object can call jquery's methods and property values.

What does $() generate? In fact, $()=jquery() means that it returns a jquery object.
Usually we use $() directly for simplicity. In fact, this function omits a parameter context. Select the matching object based on the selector, that is, $(selector, context), and return it in the form of a jQuery wrapper set. Context can be a collection of Dom objects or a jQuery packaging set. If passed in, it means that the matching object is to be selected from the context. If it is not passed in, it means that the scope is the document object (that is, all objects on the page), that is, $(selector)=$(selector, document).
This refers to the html object that calls the function.

Example:

$("#textbox").hover(   
  function() {   
       this.title = "Test";   
  },   
  fucntion() {   
      this.title = "OK”;   
  }   
);
Copy after login

This here is actually an Html element (textbox), and this is in js. The textbox has a text attribute, so there is no problem in writing it this way.

$("#textbox").hover(   
       function() {   
   $(this).title = "Test";   
       },   
       function() {   
   $(this).title = "OK";   
       }  
);
Copy after login

$(this) here is a JQuery object, and the jQuery object does not have a title attribute, so it is wrong to write like this.

Summary:
This means that the current context object is an html object, and you can call the properties and methods owned by the html object.
 $(this), the context object represented is a jquery context object, which can call jquery methods and attribute values.

The lecturer of this video is a famous young lecturer from Geek Academy. His teaching style is in line with the learning style of most learners. From point to surface, from shallow to deep, the explanation is very detailed.

The above is the detailed content of Geek Academy jquery zero-based entry video material sharing. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template