Chris K Chris K - 4 years ago 83
HTML Question

How to make a large section of html fade using jQuery?

I am using html right now and I want to make my whole page fade in and fade out on a command through jQuery (whether its click animate etc...).

I thought of using a large fixed div over everything but won't that obscure everything else being clicked?

I also thought I could wrap everything in a span but that won't work.

Finally, I understand I can fade "body", but sometimes I want to fade large sections specifically within the body. Thank you for your help.

Answer Source

You may wanna use ids

<div id="object">content</div>

<script> $("#object").fadeOut(); </script>

Or with classes:

<div class="object">content</div>

<script> $(".object").fadeOut(); </script>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download