Simple Question

V

vlastimil

I have seen somwhere web-site containing the text only with following
structure:

Paragraph-1
Paragraph-2
Paragraph-3
....

on-mouse click on Parahraph-N it was expanded as:

Paragraph-1
Paragraph-2
text21
text22
text23
...
Paragraph-3

could somebody give me advice how to do it ?

thanks, vlastimil
 
M

marss

vlastimil said:
I have seen somwhere web-site containing the text only with following
structure:

Paragraph-1
Paragraph-2
Paragraph-3
...

on-mouse click on Parahraph-N it was expanded as:

Paragraph-1
Paragraph-2
text21
text22
text23
...
Paragraph-3

could somebody give me advice how to do it ?

Put the text you want to hide/show in a separate element(for example
"div") and change its style's property display between "none" and
"block".
Example.
<p
onclick="document.getElementById('div2').style.display='block'">Paragraph-2</
p>
<div id="div2" style="display:none">text21 ... </div>

Also you can view source of the page where you see functionality that
awake your interest. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top