davidstutz/bootstrap-multiselect — pull request #199 by AubreyHewes (2013-12-14 01:15:42+00:00)
Title: Updated example for limiting the amount of allowed selections

Just simple changes:

1. Generic (uses known element for path to other known elements)
2. Only applies to "own" inputs (instead of global inputs)
3. Slight query optimizations (when possible; query once)
4. limit amount is taken from an element data-attribute; this is purely for the example as could also be a javascript defined variable or suchlike..

All in all it just removes possible error situations for anyone copying the code. This is mainly valid for point 2 where any matching inputs could be disabled (as *any* matched global inputs were modified; even non-related).