ThemeShaper Forums » Thematic


hide/reveal text between ID's within a page

(5 posts)
  • Started 12 years ago by zorro
  • Latest reply from kwight
  • This topic is not resolved
  1. zorro

    Hell all.

    1st post.

    I am trying to work out how to reveal text underneath a heading when (preferably) an arrow next to said heading is clicked.
    So, for example, I have a client's health site that has a program helping mothers go through the various stages of pregnancy.

    The program is divided into cycles.

    I want to list the cycles. Every time someone clicks on a triangle next to one of the cycles, the description of said cycle is revealed. Click on the triangle again and it is hidden.

    All of this within a single page

    The test site is visible here ( It is a page. Site is very much a work in progress.

    I looked high and low but only seem to be able to find this function in relation to menus (as opposed to inline content.) i have never used Javascript (if that is necessary) within wordpress content.



    Posted 12 years ago #
  2. this isn't really a thematic issue outright. you're gonna need to get your feet into some jquery.

    there is a .click example that will probably be useful.

    see my thread here:
    on how to initialize scripts.

    you won't need step 2b as these don't require jquery plugins, but step 2a (switching to google's jquery) is a decent idea for speed.

    Posted 12 years ago #
  3. kwight

    Combining .slideUp() and .slideDown() is also easily done with .slideToggle():

    You can create a shortcode for inserting the necessary code in to your content, and then use jQuery for the toggle effect.

    Posted 12 years ago #
  4. clever, clever. i like that. do you have a good tut on how to create shortcodes? i've copied one or two before, but have more i'd like to make. OT, but any chance you have a shortcode that makes lists?

    Posted 12 years ago #
  5. kwight

    This tut was really helpful:

    As for lists, I'm not sure a shortcode would be easier to users than learning
    <ul> and <li>... Shortcodes get unwieldly and ugly very quickly if there are numerous elements involved.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.