Prev Demo
jQuery
>
.Scroll() - Attach Scroll Event To Element
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <style> #divScroll { background: border-box; color: red; background-color: aqua; position: relative; overflow: auto; margin: 10px; padding: 5px; border: 2px solid #666; width: 1000px; height: 1000px; } </style> </head> <body> <div id="divScroll"> This is the Window.<br /> Scroll Here. </div> <script> $(window).scroll(function () { $("#divScroll").css("display", "inline").text("You are scrolling").fadeOut("slow"); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output