I got this code from other source an found it good. But when I make some test. I notice som problems. this what happen. when I click multiple times on the button there is a chance that two div boxes will show like this:
Do you mind tossing this into a http://JSFiddle.net or showing the HTML? You have a lot of weirdness going on with that snippet. Until you response, here are some pointers:
$( document ).ready(function() {
and $(function() {
are equivalent (they both run when the document is ready), so there is no need to nest them like you do.
Secondly, the $('#divX').show() after the fadeIn() is unnecessary since the element will be shown after. In fact, it’ll trump the animation and actually just pop in instead of animating (it’s actually worse than that, because the animation cycles will still be running in the background even though the element is fully shown).
Basically, what you want up there is actually this: