You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li>In <b>jQuery 1.3.x</b> only the following JavaScript events could be bound: <code>click</code>, <code>dblclick</code>, <code>keydown</code>, <code>keypress</code>, <code>keyup</code>, <code>mousedown</code>, <code>mousemove</code>, <code>mouseout</code>, <code>mouseover</code>, and <code>mouseup</code>.</li>
63
64
</ul>
64
65
</longdesc>
65
-
<example>
66
-
<desc>Click a paragraph to add another. Note that .live() binds the click event to all paragraphs - even new ones.</desc>
67
-
<code><![CDATA[
68
-
$("p").live("click", function(){
69
-
$(this).after("<p>Another paragraph!</p>");
70
-
});
71
-
]]></code>
72
-
<css><![CDATA[
73
-
p { background:yellow; font-weight:bold; cursor:pointer;
74
-
padding:5px; }
75
-
p.over { background: #ccc; }
76
-
span { color:red; }
77
-
]]></css>
78
-
<html><![CDATA[<p>Click me!</p>
79
-
80
-
<span></span>]]></html>
81
-
</example>
82
66
<example>
83
67
<desc>Cancel a default action and prevent it from bubbling up by returning false.</desc>
<desc>Use an object to bind multiple live event handlers. Note that .live() calls the click, mouseover, and mouseout event handlers for all paragraphs--even new ones.</desc>
@@ -127,15 +102,6 @@ $("p").live({
127
102
}
128
103
});
129
104
]]></code>
130
-
<css><![CDATA[
131
-
p { background:yellow; font-weight:bold; cursor:pointer; padding:5px; }
<p>Should be used in conjunction with context to determine the exact query used.</p>
10
11
<p>The <code>.live()</code> method for binding event handlers uses this property to determine how to perform its searches. Plug-ins which perform similar tasks may also find the property useful. This property contains a string representing the matched set of elements, but if DOM traversal methods have been called on the object, the string may not be a valid jQuery selector expression. For this reason, the value of <code>.selector</code> is generally most useful immediately following the original creation of the object. Consequently, the <code>.live()</code> method should only be used in this scenario. </p>
0 commit comments