Skip to content

Commit dcc26b7

Browse files
committed
Merge pull request #49 from AliciaLippert/master
API Doc: vMouseDown
2 parents e7b7bff + 53e61dd commit dcc26b7

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

entries/vmousedown.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0"?>
2+
<entry name="vmousedown" type="event" return="jQuery">
3+
<title>.vmousedown()</title>
4+
<desc>Virtualized mouseover event handler.</desc>
5+
<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>
7+
<xi:include href="../includes/core-extension-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
8+
<pre>
9+
<code><![CDATA[
10+
$(function(){
11+
$("p").vmousedown(function(){
12+
$(this).append('<span style="color:#00F;">Mouse down.</span>');
13+
});
14+
]]></code>
15+
</pre>
16+
</longdesc>
17+
<added>1.0</added>
18+
<signature>
19+
<argument name="callback" type="Function" optional="true">
20+
<desc>A function to invoke after the vmousedown event is fired.</desc>
21+
</argument>
22+
</signature>
23+
<pre>
24+
<code>
25+
<p>
26+
<iframe src="/resources/vmousedown/example1.html" style="width:100%;height:90px;border:0px"></iframe>
27+
</p>
28+
</code>
29+
</pre>
30+
<category slug="events"/>
31+
</entry>

resources/vmousedown/example1.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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>vmousedown 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, move up and down to see what happens.</p>
13+
<script>
14+
$("p").mousedown(function(){
15+
$(this).append('<span style="color:#00F;">Mouse down.</span>');
16+
});
17+
</script>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)