Results 1 to 3 of 3

Thread: Switch Content Demo2 - Dynamic Content ?

  1. #1
    Join Date
    Nov 2007
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Switch Content Demo2 - Dynamic Content ?

    1) Script Title: switch content script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tchcontent.htm

    3) Describe problem:

    im using demo 2 with "content is hidden" as default
    i did it by removing this line
    Code:
    joeexample.defaultExpanded(0,1)
    my problem when i use this code..


    Code:
    <p id="joecontent1" class="switchgroup2">
    <{foreach item=item from=$mydata}>
    <table>
    <tr>
    <td>
    	<{include file="section.html" item=$item}>
    </td>
    
      </tr></table>
      <{/foreach}>
    </p>

    - the content is open when loading..i need it to be hidden
    - when i clicked open/closed/title nothing happen..it kept displaying

    how do i make this work ?
    what should i replace p with in the code below ?
    i tried <table> and <td> it does not work
    Code:
    var joeexample=new switchcontent("switchgroup2", "p")

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    What tag are you using to wrap each Switch Content? "DIV" works most reliably across browsers fyi.

    I think a link to the problem page may be helpful here.

  3. #3
    Join Date
    Nov 2007
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I changed it to "div" and it works thank you

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •