Closed jbatchelor closed 11 years ago
Use Add a data-limit with an integer value to the object, like so:
<select id="mylist" multiple="multiple" data-limit="3">
Optionally, send in a limit_reached function to handle a selection beyond the limit that has been set.
This is in answer to a StackOverflow problem: http://bit.ly/16PINiw
Example jsFiddle on use: http://jsfiddle.net/mori57/L5EMy/
This looks pretty useful. Will merge the request, clean up a little, build and bump the version. The only thing I'm not 100% sure about is to be able set the limit in both the data and initializations.
Thanks
Use Add a data-limit with an integer value to the
Optionally, send in a limit_reached function to handle a selection beyond the limit that has been set.
This is in answer to a StackOverflow problem: http://bit.ly/16PINiw
Example jsFiddle on use: http://jsfiddle.net/mori57/L5EMy/