1
xuanyuu
how to show/hide contect
  • 2010/1/23 11:36

  • xuanyuu

  • Just popping in

  • Posts: 53

  • Since: 2009/8/15


Resized Image


how to do as above image, when i click the link, it will show the data, and i click again, the data will be hide, what is the code that i have to write to do like this?
please advise .. thanks.

2
demian
Re: how to show/hide contect
  • 2010/1/23 13:11

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


something like this ?

http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3
ghia
Re: how to show/hide contect
  • 2010/1/23 13:20

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It can be done in several ways.
One is like the options show/hide is done for notifications.
Other one is with JQuery:
<html>
  <
head>
    <
script type="text/javascript" src="jquery.js"></script>
    <
script type="text/javascript">
      $(
document).ready(function() {
        $(
"#textDiv").hide();
        $(
"#clickText").click(function() {
          $(
"#textDiv").toggle();
          return 
false;
        });
      });
    </
script>
  </
head>
  <
body>
    <
a id="clickText">See text</a>
    <
br />
    <
div id="textDiv">This text will be shown or hidden</div>
  </
body>
</
html>


4
xuanyuu
Re: how to show/hide contect
  • 2010/1/23 13:52

  • xuanyuu

  • Just popping in

  • Posts: 53

  • Since: 2009/8/15


hello.. thanks for the replies.
but i am using the XT-Contendo to do my page, so where can i write the script at the <Head>?

5
ghia
Re: how to show/hide contect
  • 2010/1/23 13:55

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


In your theme.html file.

6
xuanyuu
Re: how to show/hide contect
  • 2010/1/23 14:17

  • xuanyuu

  • Just popping in

  • Posts: 53

  • Since: 2009/8/15


i am using blue_lagoon theme, there's already a script there, so is it i just make the new code down under it?

7
ghia
Re: how to show/hide contect
  • 2010/1/23 19:05

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Not sure about what script you are talking.
Can you show a code snippet?

8
xuanyuu
Re: how to show/hide contect
  • 2010/1/24 1:23

  • xuanyuu

  • Just popping in

  • Posts: 53

  • Since: 2009/8/15


Resized Image

this is the theme.html for blue_lagoon.
so in which part that i hv to add in the script? i tried to add above, but then my page turn out upside down, then i tried to add after the 2nd scritpt, my page also turn out not in order.. so how should i add the script?

thanks.

Login

Who's Online

157 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 157


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits