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
  1. #1
    Junior Member
    Join Date
    Jul 2015
    Posts
    4
    Member #
    51249

    Post HELP WITH JavaScript

    Hi. I created a drop down text with JavaScript with the following script. The problem I am having is. That the code is listing the headers and the text linked to that. How can I put them side by side?

    Do I need to create a table with two rows, side by side and then add one header in the right and then one in the left, then make the table disappear?

    <script type="text/javascript">
    function toggleMe(a){
    var e=document.getElementById(a);
    var i = document.getElementById(a + '_image');
    if(!e)return true;
    if(e.style.display=="none"){
    e.style.display="block"
    i.src = 'images/ball1.png';
    } else {
    e.style.display="none"
    i.src = 'images/ball.png';
    }
    return false;
    }
    </script>

    <h3><a style="cursor: pointer;" onclick="return toggleMe('para1')"><style="border:0;margin-right:5px;vertical-align:middle;" />Random Text</a></h3>
    <div id="para1" style="display:none;">
    Random text
    <br>
    <br>
    <a href="domainname
    ">John Doe</a>
    </div>
    <br>
    <br>
    <br>
    <h3><a style="cursor: pointer;" onclick="return toggleMe('para2')"><style="border:0;margin-right:5px;vertical-align:middle;" />Header Text</a></h3>
    <br>
    <div id="para2" style="display:none;">
    Drop down text. This will drop down when clicking on Header Text.
    <ul>
    <br>
    <li><a href="domainname">Jane Doe</a></li>
    </ul>
    </div>
    <br>

    Hope you understand what I am trying to do. I'm new to all this, so would be greatful for a reply Thanks in advance

  2.  

  3. #2
    Junior Member
    Join Date
    Dec 2015
    Location
    Athens, Greece
    Posts
    19
    Member #
    52818
    Liked
    1 times
    If this post still exists, try to upload a link. To check it somewhere live, and to help you.


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
  •  

Tags for this Thread

All times are GMT -6. The time now is 06:26 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com