~jstys-z/helioviewer.org/timeline

« back to all changes in this revision

Viewing changes to lib/jquery/jquery.ui-1.7.1/development-bundle/demos/resizable/aspect-ratio.html

  • Committer: V. Keith Hughitt
  • Date: 2009-03-26 19:20:57 UTC
  • Revision ID: hughitt1@kore-20090326192057-u0x8rf8sf5lmmnwh
nightly build 03-26-2009: Using alpha-channel JPEG 2000 dataset

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!doctype html>
 
2
<html lang="en">
 
3
<head>
 
4
        <title>jQuery UI Resizable - Preserve aspect ratio</title>
 
5
        <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
 
6
        <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
 
7
        <script type="text/javascript" src="../../ui/ui.core.js"></script>
 
8
        <script type="text/javascript" src="../../ui/ui.resizable.js"></script>
 
9
        <link type="text/css" href="../demos.css" rel="stylesheet" />
 
10
        <style type="text/css">
 
11
        #resizable { width: 160px; height: 90px; padding: 0.5em; }
 
12
        #resizable h3 { text-align: center; margin: 0; }
 
13
        </style>
 
14
        <script type="text/javascript">
 
15
        $(function() {
 
16
                $("#resizable").resizable({
 
17
                        aspectRatio: 16/9
 
18
                });
 
19
        });
 
20
        </script>
 
21
</head>
 
22
<body>
 
23
<div class="demo">
 
24
        
 
25
<div id="resizable" class="ui-widget-content">
 
26
        <h3 class="ui-widget-header">Preserve aspect ratio</h3>
 
27
</div>
 
28
 
 
29
</div><!-- End demo -->
 
30
 
 
31
<div class="demo-description">
 
32
 
 
33
<p>Maintain the existing aspect ratio or set a new one to constrain the proportions on resize. Set the <code>aspectRatio</code> option to true, and optionally pass in a new ratio (i.e., 4/3)</p>
 
34
 
 
35
</div><!-- End demo-description -->
 
36
</body>
 
37
</html>