Experiencing an issue where the div element opens and closes smoothly with jQuery animation, but its parent does not. As a result, the entire page content appears jerky.
Here is a demo: http://jsfiddle.net/neDZP/7/
HTML:
<div id="A_to_Z_top">
<div class="section clearfix">
<div class="region region-a-to-z-top">
<div class="block block-block contextual-links-region" id="block-block-48">
<h2>INDEX A-Z</h2>
<div class="content" style="display: block;">
<div id="atozSlide">
<ul>
<li><a href="#">A</a></li>
<li><a href="#">B</a></li>
... // List of letters continues
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<p>This paragraph should slide down smoothly.</p>
Javascript:
$(function() {
// slide effect for showing and hiding A-Z header block
$('#block-block-48 .content').hide();
$('#block-block-48 h2').click(function(){
var effect = 'slide';
var options = { direction: 'up' };
var duration = 300;
$("#block-block-48 .content").stop().toggle(effect, options, duration);
});
});
CSS:
#block-block-48 {
background: #ff0000;
}
#block-block-48 h2 {
background: #035d8e;
color: #ffffff;
cursor: pointer;
font-family: sans-serif;
font-size: 16px;
margin: 0;
padding: 6px 15px 6px 0;
text-align: right;
text-decoration: none;
}
... // CSS styles continue