I’ve got an issue with the following code, it’s creating some strange animations, one lowering the content during animation by about 1em then moving it back up when it stops. The other on the archive page causes a strange shaking effect.
jQuery(document).ready(function() {
jQuery(".hide").hide();
//toggle the componenet with class msg_body
jQuery(".show").click(function()
{
jQuery(this).next(".hide").slideToggle(500);
});
});
Click on the “To Do” on the bottom on the about page
http://msc-media.co.uk/tag/france/
Click on any of the days – Strange shaking before the div expands
When jQuery starts showing and hiding the element (in your example,
.hide), it automatically adds some CSS styles to it, includingoverflow: hidden. This is what causes the jump; in your example,.hidecontains aul, which, since it’s unstyled, takes the browser’s style of amargin-top: 1em. When the parent container gets theoverflow: hidden, it changes the way it flows around those default margins.Your easiest option is to set
margin: 0on the interiorul, but you could also setoverflow: hiddenon the container element by default to eliminate the jump and then style accordingly.