Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 51 lines (38 sloc) 2.296 kb
79d4a9f @pixelspring Re-add to my local repo
pixelspring authored
1 <html>
2 <head>
3 <meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no" />
4
5 <link rel="stylesheet" href="style.css" type="text/css"/>
6 <script type="text/javascript" src="NKit.js"></script>
7 <script type="text/javascript" src="javascript.js"></script>
8
9 <script type="text/javascript">
10 // Give Page a NKNavigationController Title
11 var navController = new NKNavigationController();
12 navController.setTitle("NKSlider");
13 </script>
14
15 </head>
16
17 <body>
18
19 <script type="text/javascript">
20 // .js For Page ----------------------------------------------
21 </script>
22
23 <div class="greybutton" OnClick="NKMoveToPageAnimated('nkslider_example.html', 'flipRight')">Show NKSlider</div>
24
25
26
27 <div class="infobox">
28 <h1>NKSlider</h1>
29 <h2>Description</h2>
30 <p>Creates native Cocoa Touch slider. Control is created on the top layer of page, so if there are html elements on given coordinates control will overlap them.</p>
31 <h2>Usage</h2>
32 <p><b>init(x, y, width, callback)</b><br />initializes slider control at given coordinates with a set width and a callback (name of the function as string) to be called when slider value is changed. Callback format should be functionName(value, controlID). "value" will be between 0 and 100 and controlID is an ID of the control (in case you have one callback for many controls).</p>
33 <p><b>show()</b><br />shows initialized slider, does nothing if already shown.</p>
34 <p><b>hide()</b><br />hides initialized slider, does nothing if already hidden.</p>
35 <p><b>setValue(value)</b><br />set's current value [0..100]</p>
36 <h2>Example</h2>
37 <p>Initialize a slider</p>
38 <p class="code">
39 var slider = new NKSlider();<br />
40 slider.init(20, 325, 280, "myFunction");<br />
41 slider.setValue(20);<br />
42 slider.show();
43 </p>
44 <p>See the example source code for a more detailed implementation.</p>
45
46
47 </div>
48
49
50 </body>
51 </html>
Something went wrong with that request. Please try again.