Back to Tutorial Paste Your Code here! <!DOCTYPE html> <html> <head> <title>jQuery FadeTo Effect Method </title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("#div1").fadeTo("slow", 0.15); $("#div2").fadeTo("slow", 0.4); $("#div3").fadeTo("slow", 0.7); $("#div4").fadeTo("slow", 0.3); </script> </head> <body> <button>Click Here</button><br> <div id="demo1" style="width: 100px; height: 100px; background-color: pink;" ></div> <div id="demo2" style="width: 100px; height: 100px; background-color: orange;" ></div> <div id="demo3" style="width: 100px; height: 100px; background-color: blue;" ></div> <div id="demo4" style="width: 100px; height: 100px; background-color: red;" ></div> </body> </html> Output