Hi all,
I've got a problem with the accordion plugin height callcullation. It
is a very cool plugin, but there seems to be bug in here.

Plugin at http://bassistance.de/jquery-plugins/jquery-plugin-accordion/

It basically uses for stretching - height of the first element I hover
over, instead of the height of the highest or current element.

I use this XHTML for my navigation.
_____________
<ul id="n">
<li><a class="head" href="line.py?1">Carnival Cruises</a>
    <ul>
    <li><a href="ship.py?1.1">Carnival Conquest</a></li>
    <li><a href="ship.py?1.2">Carnival Destiny</a></li>
    <li><a href="ship.py?1.3">Carnival Fascination</a></li>
    </ul>
</li>
<li><a class="head" href="line.py?2">Celebrity Cruises</a>
    <ul>
    <li><a href="ship.py?2.1">Celebrity Century</a></li>
    <li><a href="ship.py?2.2">Celebrity Constellation</a></li>
    <li><a href="ship.py?2.3">Celebrity Galaxy</a></li>
    <li><a href="ship.py?2.4">Celebrity Infinity</a></li>
    <li><a href="ship.py?2.5">Celebrity Journey</a></li>
    <li><a href="ship.py?2.6">Celebrity Mercury</a></li>
    <li><a href="ship.py?2.7">Celebrity Millennium</a></li>
    <li><a href="ship.py?2.8">Celebrity Quest</a></li>
    <li><a href="ship.py?2.9">Celebrity Summit</a></li>
    </ul>
</li>
<li><a class="head" href="line.py?3">Costa Cruises</a>
    <ul>
    <li><a href="ship.py?3.1">Costa Allegra</a></li>
    <li><a href="ship.py?3.2">Costa Atlantica</a></li>
    <li><a href="ship.py?3.10">Costa Romantica</a></li>
    <li><a href="ship.py?3.11">Costa Serena</a></li>
    <li><a href="ship.py?3.12">Costa Victoria</a></li>
    </ul>
</li>
</ul>
_____________

And this JavaScript to start it.
_____________
$(function() {
    jQuery('#n').Accordion({
    active: false,
    header: '.head',
    navigation: true,
    event: 'mouseover',
    autoheight: false,
    animated: 'easeslide'
    });
});
_____________

Someone in the comments noted this bug and found a dirty workaround.

Changing the line 170:
var height = settings.toHide.height();
to:
var height = settings.toShow.height();

I tried his hack. It fix the problem and it works but It shows many
errors in the console:
_____________
Dom style property
Invalid value for property height:
Line: 1
-XXXpx
_____________

Plugin code at http://jquery.bassistance.de/accordion/jquery.accordion.js

Please, help.

Thank you

Reply via email to