.hide
has min-height: 70px
set. Take this out, and your snappiness goes away. The reason this is causing issues is when it goes from display: none
to display: block
, it immediately has a height of 70px.
JQUERY accordions are jumpy/snappy
-
08-10-2022 - |
Pregunta
http://jsfiddle.net/mickzer/3MbRJ/1/
Above is a fiddle of a set of accordions.
When you click the accordions to open and close them, the transition is very snappy and almost jumpy.
Here is the JQUERY:
$('#accordion .hide').hide();
$('#accordion .title .anchor').click(function(){
$(this).parent().next().slideToggle();
return false;
});
$('#accordion .title span:last').click(function () {
$('#accordion .hide').slideUp();
});
Why is this and how do I stop it happening.
Thanks
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow