February 15, 201214 yr Hello All at WDF! I have seen this link: http://www.brenz.net/snippets/open_close_div.asp It show's opening and closing div's which is something that I am after for a website. However I want to know how I can make the divs close when another one opens? Is is easy to do along with the code on that site, just a I'm a little weak in jquery.
February 16, 201214 yr Author It sounds like you are after jQuery UI Accordion. That is what I want! But can I make it so the links are external, instead of in the header's of each section?
February 16, 201214 yr Author Right the code on the accordion Jquery is working but I want it to be displayed in different part's of the site. So Ideally have all the heading's inline, and then the div's below. The format that has to be used is: <h3>heading</h3> <div>content</div> <h3>heading</h3> <div>content</div> <h3>heading</h3> <div>content</div> but I want to do, so I can display all the heading's inline: <h3>heading</h3> <h3>heading</h3> <h3>heading</h3> <div>content</div> <div>content</div> <div>content</div> Any Ideas?
February 26, 201214 yr Well, that's not very semantic - headers should be next to the related content. However, something along these lines would do: http://jsfiddle.net/h5yGr/
February 28, 201214 yr You could probably keep it semantic but fiddle around with the CSS to make it work the same way as the non-semantic method. Which would be much better for SEO. Think along the lines of absolute positioning for the content.
Create an account or sign in to comment