View on GitHub

Chineserp

Chinese region picker, Support jQuery, Zepto, Prototype Ajax API.

Download this project as a .zip file Download this project as a tar.gz file

Choose one region:

    Chinese region picker

    Chinese region picker, data provided by chinese_regions_db

    Getting Started

    Download the production version or the development version.

    Checkout chinese_regions_db project, and dump the database into json format(visit the project for details), and Copy these JSON files into your project.

    Examples

    var regionPicker = new ChineseRegion.RegionPicker({
      remote: '/json_files_path',
      initialize: function(picker){
        picker.pick('310102', function(regions, collections){
          console.log(regions, collections);
        })
      }
    });
    

    Run the examples:

    Checkout this project and install dependencies:

    cd chineserp & npm install
    

    and type following command in your peoject directory to start a server:

    node examples/server.js
    

    then, open the examples page in your browser

    http://localhost:8888/examples