Giter Site home page Giter Site logo

ios7-select-element-auto-close's Introduction

iOS7 Select Element Auto-Close

The purpose of this plugin is to override the necessity to click 'close' or 'done" after choosing an option via iOS7's default select element functionality on iPhone and iPad (see screenshot below). The option is provided to either sniff out the OS (via getOS()) or, if such functionality isn't your cup of tea, override the default by setting a max width.

In order to override the native functionality, the option elements must be wrapped in an optgroup. In case you're populating select elements dynamically (and, in turn, removing the optgroup wrappers added by init()), the class 'iOS_select' is added to all select elements so you've got a selector to target for manually reapplying optgroups


โ€” Luke Whyte (http://lukeallanwhyte.com), 2014

ios7-select-element-auto-close's People

Contributors

lukewhyte avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ios7-select-element-auto-close's Issues

Script not working in iOS

I've tried this script in thte iOS 6/7 simulator in my application and it does not seem to do anything.

In my JavaScript:
function wlCommonInit(){
$("#mySelect").bind('change', changeValue);
}

function changeValue() {
$("#selectedOption").val($("#mySelect option:selected").text());
}

I should expect, then, that once changeValue is run, the select will also be dismissed via this plug-in?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.