mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
reorganized/renamed resizable demos
This commit is contained in:
parent
479eff164e
commit
3a65a632b6
@ -1,7 +1,7 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>jQuery UI Resizable - Animate Demo</title>
|
<title>jQuery UI Resizable - Animate</title>
|
||||||
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
@ -31,9 +31,7 @@
|
|||||||
|
|
||||||
<div class="demo-description">
|
<div class="demo-description">
|
||||||
|
|
||||||
<p>
|
<p>Animate the resize action using the <strong>animate</strong> option (boolean). When this option is set to true, drag the outline to the desired location; the element animates to that size on drag stop.</p>
|
||||||
<!-- Add description here -->
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div><!-- End demo-description -->
|
</div><!-- End demo-description -->
|
||||||
</body>
|
</body>
|
||||||
|
37
demos/resizable/aspect-ratio.html
Normal file
37
demos/resizable/aspect-ratio.html
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>jQuery UI Resizable - Preserve aspect ratio</title>
|
||||||
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
|
||||||
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
#resizable { width: 160px; height: 90px; padding: 0.5em; }
|
||||||
|
#resizable h3 { text-align: center; margin: 0; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$("#resizable").resizable({
|
||||||
|
aspectRatio: 16/9
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="demo">
|
||||||
|
|
||||||
|
<div id="resizable" class="ui-widget-content">
|
||||||
|
<h3 class="ui-widget-header">Preserve aspect ratio</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- End demo -->
|
||||||
|
|
||||||
|
<div class="demo-description">
|
||||||
|
|
||||||
|
<p>Maintain the existing aspect ratio or set a new one to constrain the proportions on resize. Set the <strong>aspectRatio</strong> option to true, and optionally pass in a new ratio (i.e., 4/3)</p>
|
||||||
|
|
||||||
|
</div><!-- End demo-description -->
|
||||||
|
</body>
|
||||||
|
</html>
|
42
demos/resizable/constrain-area.html
Normal file
42
demos/resizable/constrain-area.html
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>jQuery UI Resizable - Constrain resize area</title>
|
||||||
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
|
||||||
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
#container { width: 300px; height: 300px; }
|
||||||
|
#container h3 { text-align: center; margin: 0; margin-bottom: 10px; }
|
||||||
|
#resizable { background-position: top left; width: 150px; height: 150px; }
|
||||||
|
#resizable, #container { padding: 0.5em; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$("#resizable").resizable({
|
||||||
|
containment: '#container'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="demo">
|
||||||
|
|
||||||
|
<div id="container" class="ui-widget-content">
|
||||||
|
<h3 class="ui-widget-header">Containment</h3>
|
||||||
|
<div id="resizable" class="ui-state-active">
|
||||||
|
<h3 class="ui-widget-header">Resizable</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- End demo -->
|
||||||
|
|
||||||
|
<div class="demo-description">
|
||||||
|
|
||||||
|
<p>Define the boundaries of the resizable area. Use the <strong>containment</strong> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
|
||||||
|
|
||||||
|
</div><!-- End demo-description -->
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,7 +1,7 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>jQuery UI Resizable - Default Demo</title>
|
<title>jQuery UI Resizable - Default functionality</title>
|
||||||
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
@ -28,9 +28,7 @@
|
|||||||
|
|
||||||
<div class="demo-description">
|
<div class="demo-description">
|
||||||
|
|
||||||
<p>
|
<p>Enable any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.</p>
|
||||||
<!-- Add description here -->
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div><!-- End demo-description -->
|
</div><!-- End demo-description -->
|
||||||
</body>
|
</body>
|
||||||
|
49
demos/resizable/delay-start.html
Normal file
49
demos/resizable/delay-start.html
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>jQuery UI Resizable - Delay start</title>
|
||||||
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
|
||||||
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
#resizable, #resizable2 { width: 150px; height: 150px; padding: 0.5em; }
|
||||||
|
#resizable h3, #resizable2 h3 { text-align: center; margin: 0; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$("#resizable").resizable({
|
||||||
|
delay: 1000
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#resizable2").resizable({
|
||||||
|
distance: 40
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- ADD DISTANCE DEMO -->
|
||||||
|
|
||||||
|
</div><!-- End demo -->
|
||||||
|
|
||||||
|
<div class="demo-description">
|
||||||
|
|
||||||
|
<p>Delay the start of resizng for a number of milliseconds with the <strong>delay</strong> option; prevent resizing until the cursor is held down and dragged a specifed number of pixels with the <strong>distance</strong> option.</p>
|
||||||
|
|
||||||
|
</div><!-- End demo-description -->
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -9,17 +9,15 @@
|
|||||||
<div class="demos-nav">
|
<div class="demos-nav">
|
||||||
<h4>Examples</h4>
|
<h4>Examples</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="demo-config-on"><a href="default.html">Default Resizable</a></li>
|
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||||
<li><a href="alsoresize.html">Also resize</a></li>
|
<li><a href="aspect-ratio.html">Preserve aspect ratio</a></li>
|
||||||
|
<li><a href="max-min.html">Maximum / minimum size</a></li>
|
||||||
|
<li><a href="constrain-area.html">Constrain resize area</a></li>
|
||||||
|
<li><a href="delay-start.html">Delay start</a></li>
|
||||||
|
<li><a href="snap-to-grid.html">Snap to grid</a></li>
|
||||||
|
<li><a href="visual-feedback.html">Visual feedback</a></li>
|
||||||
|
<li><a href="synchronous-resize.html">Synchronous resize</a></li>
|
||||||
<li><a href="animate.html">Animate</a></li>
|
<li><a href="animate.html">Animate</a></li>
|
||||||
<li><a href="aspectratio.html">Aspect ratio</a></li>
|
|
||||||
<li><a href="containment.html">Containment</a></li>
|
|
||||||
<li><a href="delay.html">Delay</a></li>
|
|
||||||
<li><a href="distance.html">Distance</a></li>
|
|
||||||
<li><a href="ghost.html">Ghost</a></li>
|
|
||||||
<li><a href="grid.html">Grid</a></li>
|
|
||||||
<li><a href="max.html">Max Height / Width</a></li>
|
|
||||||
<li><a href="min.html">Min Height / Width</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
40
demos/resizable/max-min.html
Normal file
40
demos/resizable/max-min.html
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>jQuery UI Resizable - Maximum / minimum size</title>
|
||||||
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
|
||||||
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
#resizable { width: 200px; height: 150px; padding: 5px; }
|
||||||
|
#resizable h3 { text-align: center; margin: 0; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$("#resizable").resizable({
|
||||||
|
maxHeight: 250,
|
||||||
|
maxWidth: 350,
|
||||||
|
minHeight: 150,
|
||||||
|
minWidth: 200
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="demo">
|
||||||
|
|
||||||
|
<div id="resizable" class="ui-widget-content">
|
||||||
|
<h3 class="ui-widget-header">Resize larger / smaller</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- End demo -->
|
||||||
|
|
||||||
|
<div class="demo-description">
|
||||||
|
|
||||||
|
<p>Limit the resizable element to a maximum or minimum height or width using the <strong>maxHeight</strong>, <strong>maxWidth</strong>, <strong>minHeight</strong>, and <strong>minWidth</strong> options.</p>
|
||||||
|
|
||||||
|
</div><!-- End demo-description -->
|
||||||
|
</body>
|
||||||
|
</html>
|
37
demos/resizable/snap-to-grid.html
Normal file
37
demos/resizable/snap-to-grid.html
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>jQuery UI Resizable - Snap to grid</title>
|
||||||
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
|
||||||
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
#resizable { width: 150px; height: 150px; padding: 0.5em; }
|
||||||
|
#resizable h3 { text-align: center; margin: 0; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$("#resizable").resizable({
|
||||||
|
grid: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="demo">
|
||||||
|
|
||||||
|
<div id="resizable" class="ui-widget-content">
|
||||||
|
<h3 class="ui-widget-header">Grid</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- End demo -->
|
||||||
|
|
||||||
|
<div class="demo-description">
|
||||||
|
|
||||||
|
<p>Snap the resizable element to a grid. Set the dimensions of grid cells (height and width in pixels) with the <strong>grid</strong> option.</p>
|
||||||
|
|
||||||
|
</div><!-- End demo-description -->
|
||||||
|
</body>
|
||||||
|
</html>
|
44
demos/resizable/synchronous-resize.html
Normal file
44
demos/resizable/synchronous-resize.html
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>jQuery UI Resizable - Synchronous resize</title>
|
||||||
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
|
||||||
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
#resizable { background-position: top left; }
|
||||||
|
#resizable, #also { width: 150px; height: 120px; padding: 0.5em; }
|
||||||
|
#resizable h3, #also h3 { text-align: center; margin: 0; }
|
||||||
|
#also { margin-top: 1em; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$("#resizable").resizable({
|
||||||
|
alsoResize: '#also'
|
||||||
|
});
|
||||||
|
$("#also").resizable();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="demo">
|
||||||
|
|
||||||
|
<div id="resizable" class="ui-widget-header">
|
||||||
|
<h3 class="ui-state-active">Resize</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="also" class="ui-widget-content">
|
||||||
|
<h3 class="ui-widget-header">will also resize</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- End demo -->
|
||||||
|
|
||||||
|
<div class="demo-description">
|
||||||
|
|
||||||
|
<p>Resize multiple elements simultaneously by clicking and dragging the sides of one. Pass a shared selector into the <strong>alsoResize</strong> option.</p>
|
||||||
|
|
||||||
|
</div><!-- End demo-description -->
|
||||||
|
</body>
|
||||||
|
</html>
|
38
demos/resizable/visual-feedback.html
Normal file
38
demos/resizable/visual-feedback.html
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>jQuery UI Resizable - Visual feedback</title>
|
||||||
|
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
||||||
|
<script type="text/javascript" src="../../jquery-1.3.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
|
||||||
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
#resizable { width: 150px; height: 150px; padding: 0.5em; }
|
||||||
|
#resizable h3 { text-align: center; margin: 0; }
|
||||||
|
.ui-resizable-ghost { border: 1px dotted gray; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$("#resizable").resizable({
|
||||||
|
ghost: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="demo">
|
||||||
|
|
||||||
|
<div id="resizable" class="ui-widget-content">
|
||||||
|
<h3 class="ui-widget-header">Ghost</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- End demo -->
|
||||||
|
|
||||||
|
<div class="demo-description">
|
||||||
|
|
||||||
|
<p>Instead of showing the actual element during resize, set the <strong>ghost</strong> option to true to show a semi-transparent part of the element.</p>
|
||||||
|
|
||||||
|
</div><!-- End demo-description -->
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user