I use Chosen jQuery plugin.
How can I show a tooltip when the mouse pointer is on some option?
UPDATED: Please notice, that my main question is about a tooltip for an OPTION. Not for whole "combobox".
I use Chosen jQuery plugin.
How can I show a tooltip when the mouse pointer is on some option?
UPDATED: Please notice, that my main question is about a tooltip for an OPTION. Not for whole "combobox".
Easiest solution I could come up with was to make chosen respect the
title
attribute on original<option>
tags because there doesn't seem to be a good way to alter the format of the DOM.Edit
chosen.jquery.js
(version 1.0.0):Around line 55: add the
title
to thethis.parsed
array:Around line 253: update the returned
<li>
to include a title:I've been using
.on('mouseenter')
with li selector, it covers the results case which doesn't happens in thechose:showing_dripdown
case:For anyone who comes across this, here's how I did it without modifying chosen:
This method uses Chris's idea, but wraps it in the showing_dropdown event.