Learn how to fadeto div content on click of the button and for the opacity effect using jquery. The opacity will be applied to the div element with the fadeto effect of jquery.

Fadeto Div Content with Slow Speed Opacity Effect

You can apply the fadeto effect to the div content on click of the button. If you want to given the slow speed for the fadeto effect, you have to pass ‘slow’ as the argument of the first parameter of fadeto().

The below example showing the fadeto effect and apply the opacity of 0.3 to the div element.
Example of fadeTo Effect

Output

This is the div content to show the example of fadeto effect.


Click the above button to see the fadeto effect of jQuery. The div content may be slightly visible to the reader because opacity can be use to make content transparent to some extent.

If you want to give the speed in millisecond, you have to check the below given example.

Fadeto Div Content with Speed of 5 Second For Opacity Effect

The below example contains the speed of 5 seconds to apply the fadeto effect to the div content. In addition to this, an opacity of 0.6 will be applied to the div content.

Output

This is the div content to show the example of fadeto effect.


Click the above button to apply the opacity of 0.6 to the div content with some speed. You can increase the speed or lower the speed of the fadeto effect of jQuery.

If you want to learn more about the fading effect, you should read jQuery fading effect page.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.