<script src="/path/to/jquery.js"></script><!-- jQuery is required --> <script src="/path/to/city-picker.data.js"></script> <script src="/path/to/city-picker.js"></script>
<div style="position: relative;"><!-- container --> <input readonly type="text"> </div>
data-toggle="city-picker"
attribute<div data-toggle="city-picker"> <input readonly type="text" data-toggle="city-picker" > </div>
<div style="position: relative;"><!-- container --> <input readonly type="text" data-toggle="city-picker" placeholder="請選擇省/市" data-level="city" > </div>
<div style="position: relative;"><!-- container --> <input readonly type="text" data-toggle="city-picker" placeholder="點擊從下拉面板中選擇省/市/區/縣"> </div>
<div style="position: relative;"><!-- container --> <input readonly type="text" data-toggle="city-picker" data-simple="true" > </div>
<div style="position: relative;"><!-- container --> <input readonly type="text" data-toggle="city-picker" style="width:50%;"> </div>
<div style="position: relative;"><!-- container --> <input readonly type="text" data-toggle="city-picker" value="廣東/廣州市/番禺區/石樓鎮"> </div>
The districts must be existed in the city-picker.data.js file!
$.fn.citypicker
method<div style="position: relative;"><!-- container --> <input id="city-picker1" readonly type="text"> </div>
$("#city-picker1").citypicker();
<div style="position: relative;"><!-- container --> <input id="city-picker2" readonly type="text"> </div>
$("#city-picker2").citypicker({ province: "廣東", city: "廣州市", district: "番禺區", district: "石樓鎮" });
The districts must be existed in the city-picker.data.js file!