Thanks for the advice! i have tried reversing the order but no luck.

the error happens when there is no accordian items on the page. The
javascript call is in the template and on every page. Other wise i
would have to make a seperate template or modify each page that only
has the acordion on it.

I thought you could have the call but if no HTML it would just not do
anything and only function if there was an accordion element on the
page or html element using that.

The innerfade works fine even on pages that do not have a call to it.
It is just the accordion that seems to want ot allways have an element
on the page.

Is there a way to have it work if there is an element but if no
element on the page dont throw an error?

This way i can have the calls in the template and i do not have to
modify a bunch of pages to add the acordion call. Right now all the
calls are in a common.js file and in the template.

Thanks for all the advice and help!

On Jul 26, 1:58 am, Stephan Beal <[EMAIL PROTECTED]> wrote:
> On Jul 25, 5:03 pm, Aaron <[EMAIL PROTECTED]> wrote:
>
> > jQuery(":first-child", this)[0] has no properties
> ...
> > [Break on this error] header: jQuery(':first-child', this)
> > [0].tagName // take first childs tagName ...
>
> As i understand it (possibly incorrectly), the problem is that :first-
> child is returning no elements, which means that there are no elements
> to select. That suggests that the HTML is not structured how the
> Accordion wants it to be structured.

Reply via email to