SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Mar 2004
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Switching layers on and off, showing initial layer

    Please take a look at http://plessner.co.uk/bio.html

    I've found some code that switched between layers to show different portions of text. Works pretty well it seems ans is fairly simple.

    Now I would like to have the Biography text to show up initially, which means that #lyr1 (layer 1) should not be 'hidden' to start with.

    Trouble is that it does not hide when clicking on another link (unless one clicks on 'Biography' first). How can I get around this -- how does the script need to be changed?

    Many thanks!
    Last edited by spirelli; Aug 13, 2007 at 00:13.

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Hello,

    I think you can add this to the bottom of your script
    Code javascript:
    cur_lyr = "lyr1";
    showLayer("lyr1");

  3. #3
    SitePoint Addict
    Join Date
    Mar 2004
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Absolutely great --- it works!


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
  •