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 replyThanks in advance