[Klug-general] YUI accordion effects

Karl Buckland buckland.karl at googlemail.com
Mon Mar 22 17:26:19 UTC 2010


Hi Dan,

Your code appears to work here(!). I put it onto one page, and did the
following, twice:
accord_first('one');
echo 'content1';
accord_end();

accord_start('two');
echo 'content2';
accord_end();

accord_start('three');
echo 'content3';
accord_last();

That created two accordions and both work? It isn't how I would
structure the PHP functions personally - I'd wrap each accordion with
<dl class="accordion"> ... </dl> and just replicate the code to create
one menu item.

Incidentally, you have some superfluous HTML. accord_end() and
accord_last both close <dt> tags that are already closed.

Karl


On 22 March 2010 16:45, Dan Attwood <danattwood at googlemail.com> wrote:
> i'm using the functions
> accord_start($title);
> some code that does stuff
> accord_last();
>
> accord_start($title);
> some more code that does something else
> accord_last();
>
> There's a whole heap of messy code in around this that's probably not a good
> idea to paste as it's very beta
>
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
>



More information about the Kent mailing list