[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/jquery_ui/jquery.ui/demos/slider/ -> steps.html (source)

   1  <!doctype html>
   2  <html lang="en">
   3  <head>
   4      <title>jQuery UI Slider - Snap to increments</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.slider.js"></script>
   9      <link type="text/css" href="../demos.css" rel="stylesheet" />
  10      <style type="text/css">
  11          #demo-frame > div.demo { padding: 10px !important; };

  12      </style>
  13      <script type="text/javascript">
  14      $(function() {
  15          $("#slider").slider({
  16              value:100,
  17              min: 0,
  18              max: 500,
  19              step: 50,
  20              slide: function(event, ui) {
  21                  $("#amount").val('$' + ui.value);
  22              }
  23          });
  24          $("#amount").val('$' + $("#slider").slider("value"));
  25      });
  26      </script>
  27  </head>
  28  <body>
  29  
  30  <div class="demo">
  31  
  32  <p>
  33  <label for="amount">Donation amount ($50 increments):</label>
  34  <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
  35  </p>
  36  
  37  <div id="slider"></div>
  38  
  39  </div><!-- End demo -->
  40  
  41  <div class="demo-description">
  42  
  43  <p>Increment slider values with the <code>step</code> option set to an integer, commonly a dividend of the slider's maximum value.  The default increment is 1.</p>
  44  
  45  </div><!-- End demo-description -->
  46  
  47  </body>
  48  </html>


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7