jquery-ui/demos/resizable/delay-start.html

53 lines
1.4 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
2009-01-16 21:47:11 +00:00
<html lang="en">
<head>
2010-09-27 19:42:06 +00:00
<meta charset="utf-8">
2009-01-16 21:47:11 +00:00
<title>jQuery UI Resizable - Delay start</title>
2010-09-27 19:42:06 +00:00
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
2011-10-18 13:38:27 +00:00
<script src="../../jquery-1.6.4.js"></script>
2010-09-27 19:42:06 +00:00
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
2009-01-16 21:47:11 +00:00
#resizable, #resizable2 { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3, #resizable2 h3 { text-align: center; margin: 0; }
</style>
2010-09-27 19:42:06 +00:00
<script>
2009-01-16 21:47:11 +00:00
$(function() {
2010-09-27 19:42:06 +00:00
$( "#resizable" ).resizable({
2009-01-16 21:47:11 +00:00
delay: 1000
});
2010-09-27 19:42:06 +00:00
$( "#resizable2" ).resizable({
2009-01-16 21:47:11 +00:00
distance: 40
});
});
</script>
</head>
<body>
2010-09-27 19:42:06 +00:00
2009-01-16 21:47:11 +00:00
<div class="demo">
<h3 class="docs">Time delay (ms):</h3>
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Time</h3>
</div>
<h3 class="docs">Distance delay (px):</h3>
<div id="resizable2" class="ui-widget-content">
<h3 class="ui-widget-header">Distance</h3>
</div>
</div><!-- End demo -->
2010-09-27 19:42:06 +00:00
<div class="demo-description">
<p>Delay the start of resizng for a number of milliseconds with the <code>delay</code> option; prevent resizing until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option.</p>
2009-01-16 21:47:11 +00:00
</div><!-- End demo-description -->
2010-09-27 19:42:06 +00:00
2009-01-16 21:47:11 +00:00
</body>
</html>