Whats wrong with this script

Discussion in 'JavaScript' started by fredericoagent, Jan 1, 2011.

  1. #1
    Hi ,

    I have the following script which does not function properly. I am willing to offer 125 chf voucher for adwords to anyone who helps me fix.

    The way the script is supposed to work is when people access the page it first collapses all the segments. you then click on the titles/headers to view the items below/sub sections.

    The problem is any sections below 'incident and request management' do not collapse.

    I needed somebody to review and fix whatever is broken between 'SM Decision Support' and 'Incident and Request Management' as SM Decision support collapses.


    -------
    Sorry have to add code as attachment as its too long for the post
     

    Attached Files:

    fredericoagent, Jan 1, 2011 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There are two unordered lists with id="tree", so jQuery only works on the first list and ignores the second one.
    The break between the lists is just before "Incident and Request Management", on line 3675 of your file.

    You can either remove the red parts below to create one big list:
    
        </ul>
        </li>
    [COLOR="red"]</ul>
    <ul id="tree">[/COLOR]
        <li style="list-style-image: url(http://content.nestle.com/globe/btc/upload/nonIndexable/images/IncedenetManagement.png)"><span class="heading">Incident and Request Management</span>
        <ul>
    
    Code (markup):
    But if you need two lists, try using classes instead of IDs, or you could rename one and add a second treeview function.
     
    Cash Nebula, Jan 2, 2011 IP