The only way i get this to work was doing this:
<ul class="accordion">
<li>
<a class="head" href="#" style="display:none"> </a>
<div>content here</div>
<a class="trigger" href="#">real head here</a>
</li>
</ul>
<script type="text/javascript">
$('.gadgets').accordion({
autoHeight: true,
header: 'a.head'
});
$('.gadgets').each(function() {
$(this).children('li').each(function(i) {
$(this).mouseover( function() {
$(this).parents('.gadgets').accordion('activate', i);
});
});
});
</script>
On 11 ago, 14:11, SamuraiDio <Diovan...@gmail.com> wrote:
> Usualy ul.accordion uses this structure:
> <ul class="accordion">
> <li>
> <a class="head" href="#">head here</a>
> <div>content here</div>
> </li>
> </ul>
> but i need one with an inverted structure, like this:
> <ul class="accordion">
> <li>
> <div>content here</div>
> <a class="head" href="#">head here</a>
> </li>
> </ul>
> Just doing this don't work, so i'm trying to use accordion('activate',
> index), but how can have the current <li> index?