V
V
veitsi2015-10-16 13:18:32
JavaScript
veitsi, 2015-10-16 13:18:32

How to add hints to jQuery Chosen component?

Good afternoon, dear jQuery gurus. I'm trying to convert a select element into a jQuery Chosen component. I can't figure out how to make Chosen show tooltips. It was possible to hang handlers on select and other elements in the form with scripts, but I still can’t imagine how to do the same for Chosen, since this element is created on the fly and I can’t even manually assign an id to it. Can you please tell me if there are any options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Evgrafovich, 2015-10-16
@Tantacula

Wrap your select in a #wrappername wrapper, then add a handler for the wrapper like this:

$('#wrappername').on('mousemove', '.chosen-container ', function(){
 // код, который отвечает за событие
});

The second option is to use the chosen:ready event to initialize your script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question