SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    cd /pub; more beer diacono's Avatar
    Join Date
    Dec 2000
    Location
    Horsham, West Sussex, UK
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do i delete a layer?

    this is pretty simple:
    i've got this function which is executed with a OnMouseOver:
    Code:
    function ShowIt()
    {
    document.body.insertAdjacentHTML('BeforeEnd', '<div id="logo" style="position:absolute; width:200px; height:200; top:-15px; right:0px; background-image: url(logo.jpg); background-position: center; background-repeat: no-repeat; Filter: Alpha(Opacity=20, FinishOpacity=0, Style=2, StartX=15, StartY=40, FinishX=0, FinishY=0) z-index: 1;"  ></div>');
    }
    but how do i make it dissapear with a OnMouseOut?
    right now the layer keeps rewriting itself again and again...

    tia
    DIEGO MOORE

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    onMouseover:
    check if the layer exists
    yes: set the visibility to visible
    no: create the layer

    onMouseout:
    set the visibility to hidden

  3. #3
    cd /pub; more beer diacono's Avatar
    Join Date
    Dec 2000
    Location
    Horsham, West Sussex, UK
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    errr... ok that sound very logical...
    but i really dunno how to do it!!

    i mainly play around with javascript on my ie temp chache (cheating? maybe)
    DIEGO MOORE


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •