How do I show something I've hidden?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • OM

    #1

    How do I show something I've hidden?

    I've just learnt that I can hide a picture using the following command:

    document.getEle mentById("image 0").style.displ ay = "none";

    BUT... how do I show the picture again!?

    Thanks.


    OM


  • OM

    #2
    Re: How do I show something I've hidden?

    I've just found the answer...

    just make it = "block"

    : )

    [color=blue]
    > I've just learnt that I can hide a picture using the following command:
    >
    > document.getEle mentById("image 0").style.displ ay = "none";
    >
    > BUT... how do I show the picture again!?
    >
    > Thanks.
    >
    >
    > OM
    >
    >[/color]


    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: How do I show something I've hidden?

      "OM" <OM@yahoo.com > writes:
      [color=blue]
      > I've just learnt that I can hide a picture using the following command:
      >
      > document.getEle mentById("image 0").style.displ ay = "none";
      >
      > BUT... how do I show the picture again!?[/color]

      Image elements are inline elements, so to restore it, you write:

      document.getEle mentById("image 0").style.displ ay = "inline";

      If you hide a block element, e.g., a div, you would set its display to
      "block" to restore it.

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      Working...