Set chosen to add "title" attribute to each generated span in amultiselect mode #1095

maxpavlov opened this Issue Mar 19, 2013 · 5 comments


None yet
6 participants

I am using multiselect on a small admin page and the whole lines of options don't usually fit on the screen. I need user to be able to see the whole text of an option by hovering a selected item (manually injected title into a control-generated span):

Is there a setting that would force adding title to a generated span elements of the multi select chosen? Perhaps a more elegant solution to an aforementioned problem? Thank you in advance.

r4j4h commented Mar 21, 2013

Just randomly to propose an idea to accomplish this extensibly, perhaps we could have an optional callback called for each generated span that would feed us the label and the element. Then the user could define their own function to determine where to cut off the label with ellipses and whether to add titles or classes or something else.

customise your chosen.css

.chzn-container-single .chzn-search and .chzn-container-multi .chzn-choices .search-choice span

add white-space:nowrap;

JCorrivo commented Jul 27, 2016

I see it's still open, but no comment since 2013

I had to do something similar and this code is not too bad I think

 $("#Your_chosen").on("mouseover", "li",  function() {
                $(this).prop("title", this.innerText);

koenpunt commented Oct 2, 2016

Long options are wrapped, so I think this is no longer an issue.



chosen-bot commented Oct 16, 2016

Hey there!

We're automatically closing this issue since the original poster (or another commenter) hasn't yet responded to the question or request made to them 14 days ago. We therefore assume that the user has lost interest or resolved the problem on their own. Closed issues that remain inactive for a long period may get automatically locked.

Don't worry though; if this is in error, let us know with a comment and we'll be happy to reopen the issue.


(Please note that this is an automated comment.)

@chosen-bot chosen-bot closed this Oct 16, 2016

@leocaseiro leocaseiro referenced this issue in leocaseiro/angular-chosen Nov 2, 2016


Dynamic "title" for each option #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment