Search Results

Search found 2 results on 1 pages for 'poprocks4344'.

Page 1/1 | 1 

  • jquery accordion - keeps hiding parent element?

    - by PopRocks4344
    Well, I fixed my original question by including after the closing tags, but now, those links won't open? So, basically, in the html below, I'm trying so that only the services section slides open, but I want the h3 tags to open those links... <div id="sp-accordion"> <h3><a href="/?page_id=3">Home</a></h3><div></div> <h3><a href="/?page_id=2">About Us</a></h3><div></div> <h3><a href="#"> Services</a></h3> <div> <p><a href="/?page_id=16">S1</a></p> <p><a href="/?page_id=14">S2</a></p> <p><a href="/?page_id=20">S3</a></p> </div> <h3><a href="/?page_id=9">Contact Us</a></h3><div></div> <h3><a href="/?page_id=5">Tips</a></h3><div></div> <h3><a href="/?page_id=108">Jobs</a></h3><div></div> <h3><a href="/?page_id=131">Newsletter</a></h3><div></div> </div> The accordion works, insomuch that when you click on the h3 tag, the container slides open, however, when it slides open, it hides the h3 before it. So, in the html below, when I click on "Services" the div beneath it slides open, but the About Us h3 disappears... This is the html: <div id="sp-accordion"> <h3><a href="/?page_id=3">Home</a></h3> <h3><a href="/?page_id=2">About Us</a></h3> <h3><a href="#"> Services</a></h3> <div> <p><a href="/?page_id=16">S1</a></p> <p><a href="/?page_id=14">S2</a></p> <p><a href="/?page_id=20">S3</a></p> </div> <h3><a href="/?page_id=9">Contact Us</a></h3> <h3><a href="/?page_id=5">Tips</a></h3> <h3><a href="/?page_id=108">Jobs</a></h3> <h3><a href="/?page_id=131">Newsletter</a></h3> </div> I'm using jquery ui, so the jquery is just this: $(document).ready(function() { $("#sp-accordion").accordion({autoHeight:false}); });

    Read the article

  • transforming flat php array into multidimensional one based on key value?

    - by PopRocks4344
    I have a flat array that I'm trying to make multidimensional. Basically, I want to find the items that have parents and create a subarray for that parent id. Right now (and this is simplified), it looks like this: Array ( [0] => stdClass Object ( [id] => 1 [parent] => 0 [name ] => Parent1 ) [1] => stdClass Object ( [id] => 7 [parent] => 1 [name] => Child1 ) [2] => stdClass Object ( [id] => 9 [parent] => 1 [name] => Child2 ) [3] => stdClass Object ( [id] => 2 [parent] => 0 [name ] => Parent2 ) [4] => stdClass Object ( [id] => 88 [parent] => 2 [name] => Childof2 ) ) I'm trying to make this: Array ( [0] => stdClass Object ( [id] => 1 [parent] => 0 [name ] => Parent1 [children] => stdClass Object ( [1] => stdClass Object ( [id] => 7 [parent] => 1 [name] => Child1 ) [2] => stdClass Object ( [id] => 9 [parent] => 1 [name] => Child2 ) ) ) [1] => stdClass Object ( [id] => 2 [parent] => 0 [name ] => Parent2 [children] => stdClass Object ( [0] => stdClass Object ( [id] => 88 [parent] => 2 [name] => Childof2 ) ) ) )

    Read the article

1