treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Opera Mini & :focus

  • I am using a drop down nav list on small screens to save some space by using media queries; using :hover works fine on most modern browsers - except for Opera Mini.

    How can I detect the non-availability of :hover without too much javascript?

    I feel that using modernizr or selectivizr is a bit of overkill just to get rid of that one problem on the opening page of anyone using an enhanced telephone; like the Nokia XpressMusic.

    Any suggestions?

  • You could use :focus with :hover to ensure usability on touch mobiles.

  • Hi Hugo, the way I understand Opera Mini is, that it detects :focus only on form elements. And the problem is not with smart phones but with the millions of users that have "enhanced" phones.

  • Paulie, yes but that discussion is focusing on focus() not the pseudo-class :focus.

    And the question is, how to get :hover to work on Opera Mini in the easiest, simplest, most elegant way without using lines and lines of javascript.

  • Are we loading jQuery at all?