JQuery event binding usage (with the difference between bind and live), jquerybind
This document describes how to bind jQuery events. We will share this with you for your reference. The details are as follows:
Html:
Javascript:
Notes:
Bind (type, [data], fn) binds an event handler function to a specific event of each matching element.Copy codeThe Code is as follows: $ ("a"). bind ("click", function () {alert ("OK ");});
Abstract: jquery's. BIND (),. live () and. the difference between delegate () is not always so obvious. However, if we have a clear understanding of all the differences, this will help us to write more concise code and prevent errors in interactive applications.
Basic Elements
DOM tree
First, it is helpful to visualize the DOM tree of an hmtl document. A simple HTML page looks like this:
Event bubbling (also known as event Propagation)
When we click
To talk about watching Internet TV, that Hunan TV Live APP is definitely the focus of the topic. According to the Chinese Business intelligence information data show: 4 months OTT Live Media rankings: Hunan satellite TV first.There is a large gap between the number of active terminals in live media, and 2 times more than the first and tenth place.
Transferred from: http://kb.cnblogs.com/page/94469/Source: Web Time: 2011-03-20 14:24 read: 25,601 recommendations: 38 original link [Favorites]
Summary: The difference between jquery's. bind (),. Live (), and. Delegate () is not always obvious, however, if we have a clear understanding of all the differences, then this will help us to write more concise code, and prevent pop-up errors in the interactive app.
Basic elements
Dom Tree
First, it is hel
The trend of video media, from the savage growth, disorderly like the frequent UGC to PGC, and live This latest video media form, also in the vortex of development, began a rapid transformation.Wen/Zhang ShuleWith the regulatory level of attention, the change in market acceptance, the number of hosts has been unable to determine the core competitiveness of the live platform. Recently, I learned that the mob
the difference between. bind (),. Live (), and. Delegate () in jqueryReference: Http://www.jb51.net/article/27309.htmDOM TreeFirst, it is helpful to visualize the DOM tree of a HMTL document. A simple HTML page looks like this.event Bubbling (also known as event propagation)When we click on a link, it triggers the Click event of the link element, which raises any execution of the function on the click event that we have bound to the element.Copy CodeT
Basic elements Dom Tree First, it is helpful to visualize the DOM tree of a HMTL document. A simple HTML page looks like this: Event bubbling (also known as event propagation) When we click on a link, it triggers the Click event of the link element, which raises any execution of the function on the click event that we have bound to the element. $ (' a '). bind (' click ', function () {alert ("that Tickles!")}); Therefore, a click action triggers the execution of the alert function. The Click
DOM tree
First, it is helpful to visualize the DOM tree of an HMTL document. A simple HTML page looks like this:
Event bubbling (also known as event Propagation)When we click a link, it triggers the Click Event of the link element. This event triggers the execution of any function on the click event that we have bound to this element.
Copy codeThe Code is as follows: $ ('A'). bind ('click', function () {alert ('that tickles! ')})
Therefore, a click operation triggers the execution of the alert f
1. bind ()
Description: binds an event handler to an element.
A basic usage of. bind:
$(selector).bind('click', function() { alert('User clicked on "foo."');});You can directly use native js instead:
$(selector).click( function() { alert('User clicked on "foo."');});In jQuery1.4.3, you can now pass false to replace an event handler. This is equivalent to an event handler binding written as function () {return false ;}. In the future, you can call. unbind (eventName, false) to remove this funct
Hulu is a U.S.-listed online video company in 2007, offering subscription-based video services with a business model similar to the domestic love-odd art and Youku. Hulu released the latest OTT live TV app--hulu in May this year, with the aim of replacing the traditional cable TV service, and the recent emergence of live broadcast applications such as YY, Ying, etc.This paper mainly shares the three aspects
1. Bind ()Description: Binds an event handler for an element.. Bind () A basic usage:$ (selector). bind (' click ', Function () { alert (' User clicked on ' foo. ');});can be directly replaced with the native JS:$ (selector). Click (function () { alert (' User clicked on ' foo. ');});In jQuery1.4.3, you can now replace an event handler by passing false instead. This will be equivalent to an event handler binding written like this: function () {return false;}. This function is removed later by
650) this.width=650; "src=" http://zhuyi.blog.techweb.com.cn/files/2016/09/huajiaowebp1.jpg "title=" HUAJIAOWEBP1 " Width= "height=" 333 "class=" aligncenter size-full wp-image-1883 "style=" Border:0px;margin-left:auto; Margin-right:auto; "/>On the evening of September 14, Fan Bingbing, Jike, Wang Zulan, Zhang Zhenyue, Wu Mo sorrow and so on a large number of first-line stars and more than 300 pepper anchors appear in the "Pepper Night 2016 Shining Star Mountain Awards Ceremony" event. In this e
DOM Tree First, it is helpful to visualize the DOM tree of a HMTL document. A simple HTML page looks like this:event Bubbling (also known as event propagation)When we click on a link, it triggers the Click event of the link element, which raises any execution of the function on the click event that we have bound to the element.Copy CodeThe code is as follows:$ (' a '). bind (' click ', function () {alert (' That tickles! ')})Therefore, a click action triggers the execution of the alert function.
The following content of this article will be updated here: "http-flv Live Module (nginx-http-flv-module) based on Nginx-rtmp-module module" continued. Note: Many of the configurations below are no longer available because the implementation is somewhat different from the earlier implementations. In order to see the history of the entire project, it has been retained, and the following update mentions why some of the configuration items are no longer
Dom Tree
First, it is helpful to visualize a DOM tree for a HMTL document. A simple HTML page looks like this:
Event bubbling (also known as event propagation)
When we click on a link, it triggers a click event for the link element that raises any execution of the function on the click event that we have bound to the element.
Copy Code code as follows:
$ (' a '). bind (' click ', function () {alert (' That tick
In Windows Live Mail, you can change the font size in bold when creating a new widget and a new one.
When I get tired, all the messages appear at 10 o'clock. Arial in Windows Live Mail? What is Song's Mail on Windows Live? When writing news and mail messages where HTML mail sending is enabled, you can change the default font to Times New Roman, Georgia, Impact, o
Micrososft will release a test version with a delay of live framework to the next month next Friday. It is actually a Live Mesh service for developers.
Live frameworks enables Web-based applicationsProgramDevelopers can also use desktop application components, while traditional application developers can use live fra
360 Browser How to live video? 360 browser live broadcast function introduction. In this live broadcast of the time, the browser can also live programs! It is reported that 360 of their own browser built-in a powerful function-the browser built-in live function, to open the
The example of this article analyzes the jquery event binding usage. Share to everyone for your reference, specific as follows:
Html:
Javascript:
Some notes:
Bind (TYPE,[DATA],FN) Bind event handlers for specific events for each matching element
Copy Code code as follows:
$ ("a"). Bind ("click", Function () {alert ("OK");});
Live (TYPE,[DATA],FN) attaches an event handler function to all matching elem
In life, people often say, to live in the present. Because, in real life people, there are living in the past, there are living in the future, and really live in the present is not much. So what does it mean to live in the present? As the name implies, is living in the present, living in today. Think, live in the prese
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.