HTML Accordion

Soldato
Joined
6 Jan 2006
Posts
3,423
Location
Newcastle upon Tyne
Can anyone point me in the right direction of an example script for an accordian similar to the one here on Yoo Theme?

Im particularly after one similar to Whitespace Styling on the link above.

Thanks, Mark
 
In what respect?
MooTools syntax is easier to read. jQueries is more concise. MooTools is larger. jQuery is smaller. MooTools is a framework. jQuery is a library.

At the end of the day, they both let you do the same thing so it's a personal choice.

I prefer jQuery for it's syntax and function chaining, plus it's documentation is fantastic.
 
MooTools syntax is easier to read. jQueries is more concise. MooTools is larger. jQuery is smaller. MooTools is a framework. jQuery is a library.

At the end of the day, they both let you do the same thing so it's a personal choice.

I prefer jQuery for it's syntax and function chaining, plus it's documentation is fantastic.

Spot on.
 
Well Im sticking with the first one Gord posted as its working!!

Having a look at the other things on that site, I notice there is a form validation tools too. Does that incorporate the submitting of the form too or just the validating? If not any pointers on submitting forms would be great as thats next on my list :p
 
No, their tools site won't run you through the functional side of form validation. Their form validator is purely for the initial input it seems.

For a functional beginning to forms I would go back to basics to start. http://www.tizag.com/htmlT/forms.php

After that, just Google for what you are trying to achieve and merge the knowledge.
 
Has anyone implemented this into WordPress? Ive got it working fine on a standard php page but when I try and put it into WP it doesnt work and comes up with an error. Ive copied the same script from the working file into the WP header but no joy.

Not sure if there is too much Jquery in there or something perhaps but any help appreciated!

Working page here

WP page with error here

Thanks
 
Last edited:
Yeh, I use it with WP all the time.

I'd say your key issue is, it doesn't look like you have the tools library in your theme. You want to add it in using wp enqueue really.

Move the execute script to the footer rather than the head. It's much better to have it at the end of the page.
 
No its a function for Wordpress to nicely load in javascript files. I still can't see the tools library on your site.
 
Just had a look on the WP codex site and thats going to take some understanding!!

The tools library is loaded in the header section if Ive done it correctly?

Code:
<script src="http://mmassociates.co.uk/common/java/jquery.tools.min.js"></script>
 
Any pointers on where to put the code in the finctions file would be great! Everytime I try to add the following it breaks the whole thing!

Code:
<?php
function my_init_method() {
wp_deregister_script( 'jquery' );    
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js');
}     
add_action('init', 'my_init_method');
?>
 
Back
Top Bottom