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