SelectBox
Jquery Select Box
HTML
<script src="http://static.zinoui.com/1.4/compiled/zino.selectbox.min.js"></script>
<link rel="stylesheet" href="http://static.zinoui.com/1.4/themes/silver/zino.selectbox.css">
<link rel="stylesheet" href="http://static.zinoui.com/1.4/themes/silver/zino.core.css">
<!DOCTYPE html>
<html lang="en">
<head>
<title>SelectBox - ZinoUI HTML5 framework</title>
<meta name="description" content="Custom select box replacement.">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="../../themes/silver/zino.core.css">
<link rel="stylesheet" href="../../themes/silver/zino.selectbox.css">
<script src="../../jquery.min.js"></script>
<script src="../../zino.selectbox.min.js"></script>
<style type="text/css">body{padding: 15px; font: normal 12px Arial, sans-serif;}</style>
</head>
<body>
<div style="margin-bottom: 10px">
<select name="country_id" id="country_id" tabindex="1">
<option value="">-- Select country --</option>
<option value="1">USA</option>
<option value="2">France</option>
<option value="3">Spain</option>
<option value="4">Brazil</option>
<option value="5">Japan</option>
<option value="6">Bulgaria</option>
<option value="7">Greece</option>
<option value="8">Italy</option>
<option value="9">India</option>
</select>
</div>
<div id="boxCity">
<select name="city_id" id="city_id" tabindex="2">
<option value="">-- Select city --</option>
</select>
</div>
</body>
</html>
JavaScript
$(function () {
$("#city_id").zinoSelectbox();
$("#country_id").zinoSelectbox({
change: function (event, ui) {
$.get("../../request/?plugin=selectbox", {
country_id: ui.value
}).done(function(data) {
$("#city_id").zinoSelectbox("destroy");
$("#boxCity").html(data);
$("#city_id").zinoSelectbox();
});
},
effect: "slide"
});
});