Mobile phone end of the selection box Mobileselect.js use

Source: Internet
Author: User

Mobile phone end of the selection box Mobileselect.js use

File Address: Https://github.com/onlyhom/mobileSelect.js

Please download for your own interest

Use procedure

1 Introducing Tags

<link rel="stylesheet" type="text/css" href= "css/mobileselect.css" >

<script src="js/mobileselect.js" type="Text/javascript" ></script>

What I'm introducing here is that the Mini actually uses the same

2 Data initialization

//Get logistics Company Information        $delivery=model (' Delivery '); $expressComList=$delivery-Expressname; $data=Array(); $i=0; foreach($expressComList  as $k=$v){            $data[$i[' ID ']=$k; $data[$i[' Value ']=$v; $i++; }        $this->assign (' Expresscomlist ', Json_encode ($data));

3 linkage using a normal array

< P ><  type= "text"  ID= "Express_trigger"  name= "Express_name"    class= "placeholder_99"  placeholder= "logistics company"/></  p>

JS function Section

var mobileselect =new Mobileselect ({trigger:'#express_trigger', Title:'Individual Selection', Wheels: [{data:{$expressComList}}], position:[2],//Initialize positioningCallbackfunction(Indexarr, data) {mobileselect.position=[Indexarr]; $('#express_code'). Val (data[0].ID); $('#express_trigger'). Val (data[0].value); }     });

 

4 The rest is to get the data that this article does not describe

Mobile phone end of the selection box Mobileselect.js use

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.