Skip to content

Commit 260a6df

Browse files
committed
API Doc: Revised vmousedown
Changed vmousedown xml and example.
1 parent 53e61dd commit 260a6df

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

entries/vmousedown.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0"?>
22
<entry name="vmousedown" type="event" return="jQuery">
3-
<title>.vmousedown()</title>
3+
<title>vmousedown</title>
44
<desc>Virtualized mouseover event handler.</desc>
55
<longdesc>
6-
<p>The jQuery Mobile <code>.vmousedown()</code> event handler simulates the "onmousedown" event handler on mobile devices. This event is fired on the initial touch of the screen on the device.</p>
6+
<p>The jQuery Mobile <code>vmousedown</code> event handler simulates the "onmousedown" event handler on mobile devices. This event is fired on the initial touch of the screen on the device.</p>
77
<xi:include href="../includes/core-extension-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
88
<pre>
99
<code><![CDATA[
1010
$(function(){
11-
$("p").vmousedown(function(){
11+
$(document).on("vmousedown", "p", function(){
1212
$(this).append('<span style="color:#00F;">Mouse down.</span>');
1313
});
1414
]]></code>

resources/vmousedown/example1.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
<body>
1212
<p>Touch here, move up and down to see what happens.</p>
1313
<script>
14-
$("p").mousedown(function(){
15-
$(this).append('<span style="color:#00F;">Mouse down.</span>');
16-
});
14+
$(function(){
15+
$(document).on("vmousedown", "p", function(){
16+
$(this).append('<span style="color:#00F;">Mouse down.</span>');
17+
});
1718
</script>
1819
</body>
1920
</html>

0 commit comments

Comments
 (0)