.hover for dropdown elements (the results) in select2

Viewed 806

Is it possible to fire an event or to add a class to a result element from the select2?

I mean there is the possibility to add classes with containerCssClass dropdownCssClass these provide the ability to add classes to the given element. But I want to add at least a class to the result items. For clarifying, those are the elements in the dropdown element.

The final usage for this is to have a .hover for the highlighted element. By hovering over it there will be some more information shown in a seperate div about the highlighted element before the user clicks on it to select it. This is because some results have the same basic data while the detailed data differs. Adding this in the results would make it too large in width and make it look chaotic so the cleanest solution would be a seperate div.

Ideally I would want to change the div if the mouse hovers over the result element for at least .5 seconds. This is due to an ajax call that takes place.

I am using select2 3.5.2.

Edit: For the bounty I meant within bootstrap, not zf2.

1 Answers
Related