css - Changing the background color on focused select box option does not work -


this selectboxit jquery plug-in, using jqueryui theme.

i have set hover action:

/* individual option hover action */ .selectboxit-option .selectboxit-option-anchor:hover {   color: #ffffff;   background-color: #ff0000;   text-decoration: none; } 

that works fine. when hover mouse on options, red background white text.

however, when this...

.selectboxit-option:focus .selectboxit-option-anchor:focus  {   color: #ffffff;   background-color: #ff0000;   text-decoration: none; } 

...nothing changes.

i see demos on selectboxit's main web page have changing background colors keyboard focus...so missing?

technically, each option doesn't use focus event, why focus pseudo selector not working you. jqueryui theme, "active" option adds ui-state-focus class, change "focus" css style, have rule this:

.selectboxit-option.ui-state-focus {   background: #ccc; } 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -