Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: JS hide/unhide

  1. #1
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    Hi!

    I'm curious if there's anyway to make the following script horizontal instead of vertical? Basically what would be "considered" as the horizontal version of a <divid>??? there really must be a way to get this done horizontally...

    Code:
    <style>
    
    <!--
    .hidden { display: none; }
    .unhidden { display: block; }
    -->
    </style>
    <script type="text/javascript">
    function unhide(divID) {
    var item = document.getElementById(divID);
    if (item) {
    item.className=(item.className=='hidden')?'unhidden':'hidden';
    }
    }
    </style>
    Then in the actual body:

    [CODE]
    <a href="javascript:unhide('experiment');" style="text-decoration: none" ><font face="Calibri" color="#FFFFFF">Contact</font></a></b></div></p>
    <div id="col2">
    <div id="experiment" class="hidden">
    <font face="Times New Roman" color="#FFFFFF"><p align="right">Try this:</p></font></h3>
    </div></div></span></td></tr>

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Ok, after editing the crap out of your code so it will at least display the Contact link, I really can't figure out what you're wanting. What do you mean "horizontal"? Or even "vertical" for that matter? If you're wanting "Try this:" to show up to the right of "Contact" instead of below it, float them both to the left.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:03 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com