Search code examples
jquerycsstypeahead.jsbloodhound

trying to catch hover on tt-suggestion


<div class="form-group">
    <label>Input</label>
    <input type="text" class="form-control typeahead" placeholder="Type few letters"  autocomplete="off" spellcheck="false">
</div>

and the code

$('.tt-suggestion').on('mouseover', function(){
    // verify input
    console.log('got it');
});

I'm not able to catch mouse hovering on typeahead's suggestions.

typeahead:cursorchanged works only for keyboard selection while .on('hover') just ignores the movement.

Any suggestions? (not tt ones :D)

so be it - manemoi Theodore


Solution

  • As long as I understand your question, you could use this syntax instead:

    $(document).on('mouseover', '.tt-suggestion', function(){
            console.log("got it");
        });