Skip to content

Commit 0c61970

Browse files
committed
Removing <em> tags from example code on live() entry - Closes jquerygh-165
1 parent a7f305f commit 0c61970

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

entries/live.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
<p>This method provides a means to attach delegated event handlers to the <code>document</code> element of a page, which simplifies the use of event handlers when content is dynamically added to a page. See the discussion of direct versus delegated events in the <a href="http://api.jquery.com/on/"><code>.on()</code></a> method for more information. </p>
3535
<p>Rewriting the <code>.live()</code> method in terms of its successors is straightforward; these are templates for equivalent calls for all three event attachment methods:</p>
3636
<pre><code>
37-
$(<em>selector</em>).live(<em>events</em>, <em>data</em>, <em>handler</em>); // jQuery 1.3+
38-
$(document).delegate(<em>selector</em>, <em>events</em>, <em>data</em>, <em>handler</em>); // jQuery 1.4.3+
39-
$(document).on(<em>events</em>, <em>selector</em>, <em>data</em>, <em>handler</em>); // jQuery 1.7+
37+
$(selector).live(events, data, handler); // jQuery 1.3+
38+
$(document).delegate(selector, events, data, handler); // jQuery 1.4.3+
39+
$(document).on(events, selector, data, handler); // jQuery 1.7+
4040
</code></pre>
4141
<p>The <code>events</code> argument can either be a space-separated list of event type names and optional namespaces, or an object of event name strings and handlers. The <code>data</code> argument is optional and can be omitted. For example, the following three method calls are functionally equivalent (but see below for more effective and performant ways to attach delegated event handlers):</p>
4242
<pre><code>

0 commit comments

Comments
 (0)