Skip to content

Commit 377296b

Browse files
committed
API Doc: Updated method section for vmouse events
vmousecancel, vmouseover, vclick
1 parent 26215ac commit 377296b

File tree

5 files changed

+69
-15
lines changed

5 files changed

+69
-15
lines changed

entries/vclick.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<entry name="vclick" type="event" return="jQuery">
3+
<title>vclick</title>
4+
<desc>Virtualized click event handler.</desc>
5+
<longdesc>
6+
<p>The jQuery Mobile <code>"vclick"</code> event handler simulates the "onclick" event handler on mobile devices.</p>
7+
<p>The idea behind virtualized mouse events is to translate touch events into mouse events. Developers should be aware that these virtualized mouse events will not prevent any synthetic mouse events from being triggered inside the browser after a touch event. If a mouse-type device is used on the system, the virtualized mouse events are dispatched at the same time as the normal mouse events.</p>
8+
<xi:include href="../includes/core-extension-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
9+
<pre><code><![CDATA[
10+
$(document).on("vclick", "p", function(){
11+
$(this).append('<span style="color:#00F;">vmouseup fired.</span>');
12+
});
13+
]]></code></pre>
14+
<p>
15+
<iframe src="/resources/vclick/example1.html" style="width:100%;height:90px;border:0px"></iframe>
16+
</p>
17+
</longdesc>
18+
<added>1.0</added>
19+
<methods>
20+
<method name="preventDefault" optional="true">
21+
<desc>
22+
A function to invoke in the event binding to prevent the synthetic click event by the browser.
23+
</desc>
24+
</method>
25+
</methods>
26+
<category slug="events"/>
27+
</entry>

entries/vmousecancel.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
</p>
1717
</longdesc>
1818
<added>1.0</added>
19-
<signature>
20-
<argument name="preventDefault" type="Function" optional="true">
21-
<desc>A function to invoke in the event binding to prevent the synthetic click event by the browser.</desc>
22-
</argument>
23-
</signature>
19+
<methods>
20+
<method name="preventDefault" optional="true">
21+
<desc>
22+
A function to invoke in the event binding to prevent the synthetic click event by the browser.
23+
</desc>
24+
</method>
25+
</methods>
2426
<category slug="events"/>
2527
</entry>

entries/vmouseover.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
</p>
1717
</longdesc>
1818
<added>1.0</added>
19-
<signature>
20-
<argument name="preventDefault" type="Function" optional="true">
21-
<desc>A function to invoke in the event binding to prevent the synthetic click event by the browser.</desc>
22-
</argument>
23-
</signature>
19+
<methods>
20+
<method name="preventDefault" optional="true">
21+
<desc>
22+
A function to invoke in the event binding to prevent the synthetic click event by the browser.
23+
</desc>
24+
</method>
25+
</methods>
2426
<category slug="events"/>
2527
</entry>

entries/vmouseup.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
</p>
1717
</longdesc>
1818
<added>1.0</added>
19-
<signature>
20-
<argument name="preventDefault" type="Function" optional="true">
21-
<desc>A function to invoke in the event binding to prevent the synthetic click event by the browser.</desc>
22-
</argument>
23-
</signature>
19+
<methods>
20+
<method name="preventDefault" optional="true">
21+
<desc>
22+
A function to invoke in the event binding to prevent the synthetic click event by the browser.
23+
</desc>
24+
</method>
25+
</methods>
2426
<category slug="events"/>
2527
</entry>

resources/vclick/example1.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>hashtag demo</title>
7+
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css">
8+
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
9+
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
10+
</head>
11+
<body>
12+
<p>Touch here to see what happens.</p>
13+
<script>
14+
$(function(){
15+
$(document).on("vclick", "p", function(){
16+
$(this).append('<span style="color:#00F;">vclick fired.</span>');
17+
});
18+
});
19+
</script>
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)