Skip to content

Commit ac000a6

Browse files
committed
Merge pull request jquery#55 from robertbosse/master
API Doc: Revised text for vmouseover/vmousecancel
2 parents d69d396 + 26215ac commit ac000a6

File tree

5 files changed

+57
-9
lines changed

5 files changed

+57
-9
lines changed

entries/vmousecancel.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<title>vmousecancel</title>
44
<desc>Virtualized mousecancel event handler.</desc>
55
<longdesc>
6-
<p>The jQuery Mobile <code>vmousecancel</code> event handler is called whenever the system cancels a virtualized mouse event. This is fired when the user decides to scroll the contents of the screen.</p>
6+
<p>The jQuery Mobile <code>vmousecancel</code> event handler is called whenever the system cancels a virtualized mouse event.</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>
78
<xi:include href="../includes/core-extension-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
89
<pre><code><![CDATA[
910
$(document).on("vmousecancel", "p", function(){
@@ -16,9 +17,9 @@
1617
</longdesc>
1718
<added>1.0</added>
1819
<signature>
19-
<argument name="callback" type="Function" optional="true">
20-
<desc>A function to invoke after the vmousecancel event is fired.</desc>
21-
</argument>
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>
2223
</signature>
2324
<category slug="events"/>
2425
</entry>

entries/vmouseover.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<title>vmouseover</title>
44
<desc>Virtualized mouseover event handler.</desc>
55
<longdesc>
6-
<p>The jQuery Mobile <code>"vmouseover"</code> event handler simulates the "onmouseover" event handler on mobile devices. This is fired on the initial touch of the screen on the device.</p>
6+
<p>The jQuery Mobile <code>"vmouseover"</code> event handler simulates the "onmouseover" 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>
78
<xi:include href="../includes/core-extension-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
89
<pre><code><![CDATA[
910
$(document).on("vmouseover", "p", function(){
@@ -16,9 +17,9 @@
1617
</longdesc>
1718
<added>1.0</added>
1819
<signature>
19-
<argument name="callback" type="Function" optional="true">
20-
<desc>A function to invoke after the vmouseover event is fired.</desc>
21-
</argument>
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>
2223
</signature>
2324
<category slug="events"/>
2425
</entry>

entries/vmouseup.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0"?>
2+
<entry name="vmouseup" type="event" return="jQuery">
3+
<title>vmouseup</title>
4+
<desc>Virtualized mouseup event handler.</desc>
5+
<longdesc>
6+
<p>The jQuery Mobile <code>"vmouseup"</code> event handler simulates the "onmouseup" 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("vmouseup", "p", function(){
11+
$(this).append('<span style="color:#00F;">vmouseup fired.</span>');
12+
});
13+
]]></code></pre>
14+
<p>
15+
<iframe src="/resources/vmouseup/example1.html" style="width:100%;height:90px;border:0px"></iframe>
16+
</p>
17+
</longdesc>
18+
<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>
24+
<category slug="events"/>
25+
</entry>

resources/hashchange/example1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
// To change src attribute of parent iframe element
7373
$('.hashExLink').on('click', function() {
74-
window.parent.document.getElementById( "hashtagIframe" ).src = "/resources/hashtag/example1.html" + $(this).attr( "href" );
74+
window.parent.document.getElementById( "hashtagIframe" ).src = "/resources/hashchange/example1.html" + $(this).attr( "href" );
7575
window.parent.document.getElementById( "hashtagIframeLink" ).innerHTML = "example1.html" + $(this).attr( "href" );
7676
});
7777
});

resources/vmouseup/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("vmouseup", "p", function(){
16+
$(this).append('<span style="color:#00F;">vmouseup fired.</span>');
17+
});
18+
});
19+
</script>
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)