That's true. It's easy to forget that jQuery can't do EVERYTHING for you
('cause it's awesome). Thanks
On 2/13/07, Sam Collett <[EMAIL PROTECTED]> wrote:
On 13/02/07, Jon Ege Ronnenberg <[EMAIL PROTECTED]> wrote:
> Hi all.
>
> I've just found the Accordion plug-in and it seems pretty straight
forward
> to implement but I get an "$(":first-child", this)[0] has no properties"
in
> firebug when the page load and the navigation doesn't work. My code is
> really simple but maybe it could be thickbox or I'm just tired..
> ...
> <script type="text/javascript"
> src="lib/jquery/jquery-compressed.js"></script>
> <script type="text/javascript"
> src="lib/ThickBox/ThickBox.js"></script>
> <script type="text/javascript"
> src="lib/Accordion/jquery.accordion.pack.js"></script>
>
> <script type="text/javascript">
> $('#ulClubs').Accordion({
> header: 'a.club'
> });
> ...
> <ul id="ulClubs">
> <li>
> <a class="club" href="#">Club majo</a>
> <ul>
> <li><a href="#">DJs</a></li>
> <li><a href="#">Shows</a></li>
> </ul>
> </li>
> <li>
> <a class="club" href="#">En anden club</a>
> <ul>
> <li><a href="#">DJs</a></li>
> <li><a href="#">Shows</a></li>
> </ul>
> </li>
> <li>
> <a class="club" href="#">En anden club</a>
> <ul>
> <li><a href="#">DJs</a></li>
> <li><a href="#">Shows</a></li>
> </ul>
> </li>
> </ul>
>
>
> Do any of your guys (and girls) see any problems in this (except from
the
> fact that it doesn't work)?
>
> Regards, Jon
It looks like you are running the code before the page is ready. Try
$( function() {
$('#ulClubs').Accordion({
header: 'a.club'
});
});
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/