123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <!DOCTYPE html>
- <html>
- <head>
- <link rel="stylesheet" href="../../../themes/themeroller/default-theme/ui.all.css" type="text/css" media="screen" />
- <script src="../../../lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../src/defaults.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../src/core.js" type="text/javascript" charset="utf-8"></script>
- <style type="text/css" media="screen">
- body {
- font-size: 14px;
- padding: 15px;
- font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
- }
- p {
- margin: 30px 10px;
- }
- </style>
- </head>
- <body>
- <div id="rating01"></div>
-
- <br style="clear: both;" />
- <br style="clear: both;" />
-
- <button onclick="window.rating1.setValue(0);">clear</button>
- <button onclick="window.rating1.setValue(3);">set value to 3</button>
- <button onclick="window.rating1.setValue(5);">set value to 5</button>
-
- <br /><br />
-
- <button onclick="alert(window.rating1.getValue());">get value</button>
-
- <br /><br />
- <span>Readonly Rating</span>
- <div id="rating02"></div>
-
- <br style="clear: both;" />
- <br style="clear: both;" />
-
- <button onclick="window.rating2.setValue(0);">clear</button>
- <button onclick="window.rating2.setValue(3);">set value to 3</button>
- <button onclick="window.rating2.setValue(5);">set value to 5</button>
-
- <br /><br />
-
- <button onclick="alert(window.rating2.getValue());">get value</button>
-
- <script type="text/javascript" charset="utf-8">
-
- if (window.widget) {
- widget.setNavigationEnabled(false);
- }
- var init = function() {
-
- window.rating1 = new Nokia.Rating({
- element: '#rating01',
- value: 2,
- create: function() {
- console.log("Rating: Create.");
- },
- change: function(event, value) {
- console.log("Rating: Change - " + value);
- }
- });
-
- window.rating2 = new Nokia.Rating({
- element: '#rating02',
- value: 3,
- readonly: true
- });
-
- /*
- * Hide splash when its all done.
- */
-
- Nokia.hideSplash();
- };
-
- /*
- * Show splash while loading components.
- */
-
- Nokia.showSplash('<span>loading</span>');
-
- Nokia.use('rating', init);
- </script>
- </body>
- </html>
|