JS Mobile plug-in iosselect.js page of multiple use of the plugin problem

Source: Internet
Author: User

Iosselect is a picker component under the WebApp, which makes it easy to implement a variety of selector effects. For example, select Time selection date selection and so on. Online tutorials are a lot of, GitHub explained: Https://github.com/zhoushengmufc/iosselect, good start, compatibility is also good, but there will be a little bit of a problem, here is to say that the same page multiple calls to the plugin when the problem occurs.

The plugin may be called more than once in the page, such as.

The demo contains two calls to the plugin in the page, but the data used for two calls is one. And the data we call two times is definitely different, so we've changed it a bit (only one-level selection).

The call in the page needs to change this point, in addition to the data in the call of the bank.js inside to make changes, such as

It turns out that data is only a single-level array, containing n more than one object, the modified data can contain more than n arrays, the contents of the array can be defined by themselves, and the number of calls consistent.

This allows the plugin to be called multiple times on the same page.

JS Mobile plug-in iosselect.js page of multiple use of the plugin problem

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.