[Open Source] jquery provincial/municipal plug-ins, open source jquery provincial/municipal

Source: Internet
Author: User

[Open Source] jquery provincial/municipal plug-ins, open source jquery provincial/municipal

First, demonstration address: http://jasonlong-7.github.io/jquery-city/

 

1.animation effects use animate.css

2. Supports selection and keyboard input (in Chinese and English)

3. json format returned by the server

{"Provinces": [{"code": "1000", "name": "Beijing"}], "citys": [{"code": "100001 ", "name": "BEIJING", "fullPY": "BEIJING", "firstPY": "OBJ", "provinceCode": "1000", "provinceName": "BEIJING ", "hotCity": true}], "areas": [{"code": "10000101", "name": "Dongcheng District", "cityId": "100001 ", "fullPY": "DONGCHENGOU", "firstPY": "DCO", "provinceCode": "1000", "provinceName": "Beijing", "cityCode": "100001 ", "cityName": "Beijing"}]}

4. How to use it?

1 ).REFERENCE The following css Resources

 

<Link href = "../css/jquery.city.css" rel = "stylesheet"/> <link href = "../css/animate.min.css" rel = "stylesheet"/> <! -- Optional -->

2 ).<body>REFERENCE The following js Resources

<script src="../js/jquery-1.10.2.js"></script><script src="../js/jquery.city.js"></script>

3). Example

1 <script> 2 $ (function () {3 $ ('# txt_city '). jcity ({4 urlOrData: '/js/citydata. json', 5 animate: {showClass: 'animated flipoutx', hideClass: 'animated flipoutx'}, // you can define Animation 6 onChoice: function (data) {7 console. log (data); 8} 9}); 10}); 11 </script>

 

Reprinted please mark the original address: http://www.cnblogs.com/JasonLong/p/5278955.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.