forked from byrichardpowell/Style-Select
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
143 lines (82 loc) · 3.95 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 7 ]><html class="no-js ie6" lang="en"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7" lang="en"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8" lang="en"><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Style Select</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- For all browsers -->
<link rel="stylesheet" media="screen" href="css/global.css">
<link rel="stylesheet" media="print" href="css/print.css">
<style type="text/css">
.download { float: right; }
pre { background: #000; color: #fff; padding: 15px;}
</style>
</head>
<body>
<div class="container">
<article class="clm left">
<h1>Style Select</h1>
<p>Fancy select aims to provide complete control over select box styling. Since Select Box's are native OS, the styling options are (understandably) limited</p>
<h2>How does it work?</h2>
<p>Style Select works by hiding the native select and inserting an unordered list after it. The unordered list has most of the functionality f a native select, but is completely stylable. You can style the new select in the external stylesheet</p>
<h2>Features?</h2>
<p>Not many. Not all of the functionality of a standard select is transferred across and theres very little configuration options. I've built this precisely to my needs, so if i didnt need a feature, I didnt build it.</p>
<h2>Events?</h2>
<p>You can attach event listeners to the select as per usual.</p>
<h2>Questions?</h2>
<ul>
<li><a href="mailto:[email protected]">email me</a></li>
<li><a href="http://twitter.com/#!/byrichardpowell">tweet me</a></li>
<li><a href="http://www.byrichardpowell.co.uk">visit my website</a></li>
</ul>
</div>
<aside class="clm">
<h1>Demo</h1>
<p><pre>$('select').styleSelect()</pre></p>
<select name="" id="date-range" title="Select a Date Range">
<option value="one">Past 30 days</option>
<option value="two">Today</option>
<option value="three">Yesterday</option>
<option value="four">Last Week</option>
<option value="five">Last fortnight</option>
<option value="six">Past 30 days</option>
</select>
<select name="" id="date-range" title="Select a Date Range">
<option value="one">Dave</option>
<option value="two">Edward</option>
<option value="three">Francis</option>
<option value="four">Gavin</option>
<option value="five">Harry</option>
<option value="six">Ian</option>
</select>
<h2>Download</h2>
<p>
You can download this project in either <a href="http://github.com/byrichardpowell/Style-Select/zipball/master">zip</a> or <a href="http://github.com/byrichardpowell/Style-Select/tarball/master">tar</a> formats. You can also clone the project with <a href="http://git-scm.com">Git</a> by running:
<pre>$ git clone git://github.com/byrichardpowell/Style-Select</pre>
</p>
<p>
get the source code on GitHub : <a href="http://github.com/byrichardpowell/Style-Select">byrichardpowell/Style-Select</a>
</p>
</aside>
</div>
<a href="http://github.com/byrichardpowell/Style-Select">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
</a>
<!-- JQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script> window.jQuery || document.write('<script src="js/lib/jquery-1.6.1.min.js">\x3C/script>') </script>
<!-- Include the StyleSelect File -->
<script src="js/styleSelect.jquery.js"></script>
<script>
$(document).ready( function() {
// Then call styleSelect on a select
$('#date-range, #date-range-2').styleSelect()
})
</script>
</body>
</html>