Skip to content

Instantly share code, notes, and snippets.

@daveworth
Created April 18, 2012 15:16
Show Gist options
  • Save daveworth/2414263 to your computer and use it in GitHub Desktop.
Save daveworth/2414263 to your computer and use it in GitHub Desktop.
StylishSelect bug report
<!DOCTYPE html>
<html>
<head>
<title>jQuery Stylish Select Bug Report</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="stylish-select.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="jquery.stylish-select.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$('#grouped-dropdown, #non-grouped-dropdown').sSelect({defaultText: 'Music'});
});
</script>
<style type="text/css">
body {font-family:Arial, Helvetica, sans-serif; font-size:12px;}
.selCont {clear:both; margin-bottom:20px; padding-bottom:40px; float:left; border-bottom:dotted 1px #000; width:600px;}
</style>
</head>
<body>
<form action="" method="post">
<div class="selCont">
<h2>Grouped options</h2>
<p>I would expect the default text presented by StylishSelect to be 'Music' from the JS applied</p>
<pre class="brush: javascript">
$('#grouped-dropdown').sSelect({defaultText: 'Music'});
</pre>
<select id="grouped-dropdown" name="grouped-dropdown">
<optgroup label="Tool">
<option value="1">Opiate</option>
<option value="2">Undertow</option>
<option value="3">Aenima</option>
<option value="4">Lateralus</option>
</optgroup>
<optgroup label="A Tribe Called Quest">
<option value="5">People's Instinctive Travels and the Paths of Rhythm</option>
<option value="6">The Low End Theory</option>
<option value="7">Midnight Marauders</option>
<option value="8">Beats, Rhymes and Life</option>
<option value="9">The Love Movement</option>
</optgroup>
</select>
</div>
<div class="selCont">
<select id="non-grouped-dropdown" name="non-grouped-dropdown">
<option value="1">Opiate</option>
<option value="2">Undertow</option>
<option value="3">Aenima</option>
<option value="4">Lateralus</option>
</select>
</div>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment