Tokenize2 is a plugin which allows your users to select multiple items from a predefined list or ajax, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook or tags on tumblr.
I change tokensMaxItems on the tokenize options based on a user option. Unfortunately changing maxItems to > $('li.token', this.tokensContainer).length results in the search container being display:list-item.
This is because jQuery show on searchContainer guesses the correct display type and reverts to display:list-item instead of display:inline-block.
This can be resolved by replacing show/hide with a class to set display:none.
I change
tokensMaxItems
on the tokenize options based on a user option. Unfortunately changing maxItems to >$('li.token', this.tokensContainer).length
results in the search container beingdisplay:list-item
.This is because jQuery
show
onsearchContainer
guesses the correct display type and reverts todisplay:list-item
instead ofdisplay:inline-block
. This can be resolved by replacing show/hide with a class to setdisplay:none
.