Forums

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
    Posts
  • #23802
    jocke76
    Member

    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.

    So..
    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.

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

    And some html/javascript code

    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.

    Code:

    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.