r2223 - branches/dev/spinner/demos/spinner

r2223 - branches/dev/spinner/demos/spinner

Author: joern.zaefferer
Date: Sun Mar 8 13:46:42 2009
New Revision: 2223
Modified:
branches/dev/spinner/demos/spinner/donation.html
Log:
updating dev/spinner: improved donation demo
Modified: branches/dev/spinner/demos/spinner/donation.html
==============================================================================
--- branches/dev/spinner/demos/spinner/donation.html    (original)
+++ branches/dev/spinner/demos/spinner/donation.html    Sun Mar 8 13:46:42
2009
@@ -9,8 +9,11 @@
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
-        $("#donation").spinner({
-            currency: '$',
+        var currency = $("#currency").change(function() {
+            $("#amount").spinner("option", "currency", $(this).val()).blur();
+        });
+        $("#amount").spinner({
+            currency: currency.val(),
            min: 5,
            max: 1000,
            stepping: 5
@@ -22,8 +25,15 @@
<div class="demo">
-<label for="donation">Select the amount to donate:</label>
-<input id="donation" name="donation" value="5" />
+<label for="currency">Currency</label>
+<select id="currency" name="currency">
+    <option value="$">US $</option>
+    <option value="€">EUR €</option>
+    <option value="¥">YEN ¥</option>
+</select>    
+<br/>
+<label for="amount">Select the amount to donate:</label>
+<input id="amount" name="amount" value="5" />
</div><!-- End demo -->