Checking if a <div> is visible

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    Checking if a <div> is visible

    Hi,

    I'm using scriptaculous and prototype. I have a div that should be showing while a nother one is not visible and the other way around.

    My question is, can I some way detect if a div is showing or nor?

    Thanks,
    Marko
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    I wouldn't be sure of the exact syntax in prototype/scriptaculous, but in JavaScript you would check the elem.style.disp lay or elem.style.visi bility property (depending on which is being used to show/hide).

    Comment

    • MarkoKlacar
      Recognized Expert Contributor
      • Aug 2007
      • 296

      #3
      Hi,

      Thanks, it worked lika a charm :-)

      /MK

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        No problem. You're welcome :)

        Comment

        Working...