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

Home Forums JavaScript visibility and display problems

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #23802

    Hello all

    My first post,, yeah .. =)

    This topic could be on css-help aswell,, but I think it’s more of an js-problem than a css-problem.

    When declaring a <div> and trying to, via javascript, determine wether the div is visible
    or not. Javascript can’t see the attributes, visibility and display, when declared in css.

    An example..
    First some random css-file.

    div#testdiv {
    visibility: hidden;
    display: none;

    And some html/javascript code





    Javascript never thinks that the div-element is hidden and not display (display: none) unless
    I explicity declare that in the div-declaration.. like this.


    Am I doing something wrong or is this a known limitation of javascript/css… or what’s happening.

    Happy holidays!!

    Regards Jocke

    PS. Thanks Chris for a really good show, looking forward to more css-tips and tricks! DS.

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