jquery.selectBoxIt.js
jquery.selectBoxIt.js copied to clipboard
Use selectOption for multiple select into a div
hi, I need to use the Option select multiple select box here is the example that currently is not working:
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>SelectBoxIt demo</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" />
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" />
<link type="text/css" rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="http://gregfranko.com/jquery.selectBoxIt.js/css/jquery.selectBoxIt.css" />
</head>
<body>
<div id="test">
<select>
<option value="SelectBoxIt is:" selected>---1--</option>
<option value="a jQuery Plugin">a jQuery Plugin</option>
<option value="a Select Box Replacement" >a Select Box Replacement</option>
<option value="a Stateful UI Widget">a Stateful UI Widget</option>
</select>
<select>
<option value="SelectBoxIt is:" selected>---2--</option>
<option value="a jQuery Plugin">a jQuery Plugin</option>
<option value="a Select Box Replacement" >a Select Box Replacement</option>
<option value="a Stateful UI Widget">a Stateful UI Widget</option>
</select><select>
<option value="SelectBoxIt is:" selected>---3--</option>
<option value="a jQuery Plugin">a jQuery Plugin</option>
<option value="a Select Box Replacement" >a Select Box Replacement</option>
<option value="a Stateful UI Widget">a Stateful UI Widget</option>
</select>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="http://gregfranko.com/jquery.selectBoxIt.js/js/jquery.selectBoxIt.min.js"></script>
<script>
$(function () {
setTimeout(function () {
var selectBox = $("#test select").selectBoxIt();
console.log(selectBox);
selectBox.data("selectBoxIt").selectOption(2);
}, 3000);
$("select").selectBoxIt();
});
</script>
</body>
</html>
you can get it running?
@gfranko help me please