The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Using onfocus/onblur to show/hide content…

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #33961

    I’m trying to use onfocus/onblur to show/hide content, but I haven’t been able to get it woking…

    I have and example here using :hover, but I would like to use onfocus and onblur instead of just :hover.

    I wanted to use only css at first, but that didn’t work…

    Could someone point me to an example script that I can work from?

    Thank you,


    What exactly would you like to do? And what exactly is it that you think focus and blur does?


    In the example I’m using hover with css. But, I would like to us onfocus and onblur to have more control over how long the content stays visible. I don’t want it to disappear as soon as you roll cursor off. Content should stay visible until user clicks away.

    Thank you,


    I’ve got a new example working…

    I still need to figure out a few details…
    Like do I have to use an input button as trigger or can I use an image or another html element?

    Focus and blur have to do with forms.


    Wow! That’s much better. Gotta love jQuery.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.