FadeOut div after onClick event problem?

I feel like I must be missing something, because this seems pretty simple compared to what you're already doing, but here you go: $('. Reveal_ccform'). Click(function() { $('#commenttype').fadeOut(); }) EDIT For a smoother and more complex animation as per the request in the following comment, do something like this: $('.

Reveal_ccform'). Click(function() { $('#commenttype'). Animate({height: 0, opacity: 0}, function() { $(this).remove(); }); }) This will create a custom animation to fade out the div containing the radio buttons while simultaneously reducing the height to zero, which will solve the jumping issue.

The callback function removes the div after the animation is complete (not a necessary step, but keeps the DOM in line with what the user is seeing) See the result: jsfiddle.net/8bCAg.

I feel like I must be missing something, because this seems pretty simple compared to what you're already doing, but here you go: $('. Reveal_ccform'). Click(function() { $('#commenttype').fadeOut(); }); **EDIT** For a smoother and more complex animation as per the request in the following comment, do something like this: $('.

Reveal_ccform'). Click(function() { $('#commenttype'). Animate({height: 0, opacity: 0}, function() { $(this).remove(); }); }); This will create a custom animation to fade out the div containing the radio buttons while simultaneously reducing the height to zero, which will solve the jumping issue.

The callback function removes the div after the animation is complete (not a necessary step, but keeps the DOM in line with what the user is seeing). See the result: jsfiddle.net/8bCAg.

Thats great it works! Thank you so much. I tried a few different things but just couldnt get it to work.Im still learning JS really, so still a bit of a noob.

The only thing with this now is, when the #commenttype DIV fadesOut the #ccform_container snaps or jumps up to where the #commenttype DIV was (before it faded out). This kinda takes away from the smooth animations that the user sees previously.Is there anyway we can make the #ccform_container move slowly or smoothly up to where #commenttype DIV was rather than snap back up? – Phil Aug 10 '10 at 23:25 I have edited my answer per your request.

– Ender Aug 11 '10 at 15:25.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions