SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    790
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Show/Hide Script Question

    I have a page linked below that is using Dreamweaver's Show and Hide script. It seems to be working properly except for the fact that each of my DIVs are not aligning to the top of that area. Is there any solution to force the position of my DIVs to appear at the top of the main content area? For example, I like the position of the text for the button "SAFETY". Thanks for everyones input!

    LINK-
    http://jafielden.com/compliance2.php


    Todd
    Todd Temple > T2 Design

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the script at the top of your page

    Code:
    function MM_showHideLayers() { //v9.0
      var i,p,v,obj,args=MM_showHideLayers.arguments;
      for (i=0; i<(args.length-2); i+=3) 
      with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
        if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
        obj.visibility=v; }
    }
    change to

    Code:
    function MM_showHideLayers() { //v9.0
      var i,p,v,obj,args=MM_showHideLayers.arguments;
      for (i=0; i<(args.length-2); i+=3) 
      with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
        if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
        obj.display=v; }
    }


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
  •