typeahead.js - Color of the .tt-suggestion.tt-cursor can't be changed -


i have change color of font of .tt-suggestion.tt-cursor , remove it's background.

the following css doesn't work:

.tt-suggestion.tt-cursor {    color: #009bc6; } 

cause

this have been changed in typeahead version 0.11, moving mouse on .tt-suggestion element no longer triggers .tt-cursor class, see this issue #1195.

solution

// workaround: add support tt-cursor style on mouseenter/mouseleave $('.twitter-typeahead')    .on('mouseenter', '.tt-suggestion', function(e){       $('.tt-cursor', $(this).closest('.tt-menu')).removeclass('tt-cursor');       $(this).addclass('tt-cursor');    })                      .on('mouseleave', '.tt-menu', function(e){       $('.tt-cursor', $(this).closest('.tt-menu')).removeclass('tt-cursor');    }); 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -