Files
jquery-ui/demos/interaction/default.html
Mike Sherov c15481eeb1 Merge branch 'master' into interactions
Conflicts:
	demos/draggable/constrain-movement.html
	demos/draggable/cursor-style.html
	demos/draggable/default.html
	demos/draggable/events.html
	demos/draggable/handle.html
	demos/draggable/revert.html
	demos/draggable/visual-feedback.html
	demos/droppable/default.html
	grunt.js
	tests/unit/draggable/draggable.html
	tests/unit/draggable/draggable_core.js
	tests/unit/draggable/draggable_options.js
	tests/unit/draggable/draggable_test_helpers.js
	tests/unit/droppable/droppable.html
	tests/unit/droppable/droppable_options.js
	ui/draggable.js
	ui/jquery.ui.droppable.js
	ui/sortable.js
2014-02-10 14:43:24 -08:00

64 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Interaction - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<script src="../../jquery-1.10.2.js"></script>
<script src="../../ui/core.js"></script>
<script src="../../ui/widget.js"></script>
<script src="../../ui/interaction.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#startmovestop { width: 200px; height: 100px; background: lightBlue; }
</style>
<script>
$(function() {
$.widget( "demo.startmovestop", $.ui.interaction, {
_start: function() {
$( "#startcount" ).text(function( i, current ) {
return parseInt( current, 10 ) + 1;
});
},
_move: function() {
$( "#movecount" ).text(function( i, current ) {
return parseInt( current, 10 ) + 1;
});
},
_stop: function() {
$( "#stopcount" ).text(function( i, current ) {
return parseInt( current, 10 ) + 1;
});
}
});
$( "#startmovestop" ).startmovestop();
});
</script>
</head>
<body>
<div class="demo">
<div id="startmovestop"></div>
<dl>
<dt>Start:</dt>
<dd id="startcount">0</dd>
<dt>Move:</dt>
<dd id="movecount">0</dd>
<dt>Stop:</dt>
<dd id="stopcount">0</dd>
</dl>
</div><!-- End demo -->
<div class="demo-description">
<p>This demo shows a simple interaction built using the interaction utility (jquery.ui.interaction.js).</p>
<p>Make a down-move-up motion starting on the blue box above using the mouse or a touch input device to see the interaction events</p>
</div><!-- End demo-description -->
</body>
</html>