Double click issue with Accordion
Hi, I am transferring a website from HTML to Joomla 1.5. Everything works fine except the
accordion which has one problem: while on the html page each hidden content slides down with a single click, in Joomla it requires two clicks. I have mantained the same scripts, apart from the jQuery libraries plugin, which I found among the Joomla Extensions (Joomla has MooTools enabled by default).
Here is the Accordion script I am using:
-
| jQuery(function($) { |
|
$('.contentPane').hide(); |
|
$('.headPane').toggle(function(){ |
|
track($(this).children('.accrocheImg').children('img').attr('alt')); |
|
//var chapitre = $(this).children('.accrocheImg').children('img').attr('alt'); |
|
//track(chapitre); |
|
}, function(){}); |
|
$('.headPane').click(function() { |
|
$(this).next('.contentPane').slideToggle('slow'); |
|
$(this).children('.accrocheTxt').toggleClass('accrocheTxtOpen'); |
|
}); |
|
$('.headPane').hover(function () { |
|
$(this).children('.accrocheImg').children('img').addClass("survolimg"); |
|
}, function () { |
|
$(this).children('.accrocheImg').children('img').removeClass("survolimg"); |
|
}); |
|
}); |