Techno Blender
Digitally Yours.

What are scrollstart and scrollstop events in jQuery ?

0 50


<!DOCTYPE html>

<html>

  

<head>

    <title>scroll event</title>

    <link rel="stylesheet" href=

    <script src=

    </script>

</head>

  

<body>

    <div style="display: flex; 

        justify-content: center; margin-top: 120px">

        <div>

            <h3>scroll start example</h3>

            <div style="

            width: 500px;

            height: 120px;

            border: 1px solid black;

            overflow: scroll;

            margin-right: 20px;

            color: red;

          " id="div1">

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

            </div>

        </div>

        <div>

            <h3>scroll stop example</h3>

            <div style="

            width: 500px;

            height: 120px;

            border: 1px solid black;

            overflow: scroll;

            color: red;

          " id="div2">

                A Computer Science portal for 

                geeks. It contains well written, 

                well thought and well explained

                computer science and programming 

                articles, quizzes and practice/

                competitive programming/company 

                interview Questions. A Computer 

                Science portal for geeks. It 

                contains well written, well thought 

                and well explained computer science 

                and programming articles, quizzes 

                and practice/competitive programming/

                company interview Questions. A 

                Computer Science portal for geeks. 

                It contains well written, well

                thought and well explained computer 

                science and programming articles, 

                quizzes and practice/competitive 

                programming/company interview Questions.

            </div>

        </div>

    </div>

  

    

    <script>

        $(document).ready(function () {

            $("#div1").on("scrollstart", function () {

                $("#div1").css("background", "lightgreen");

            });

            $("#div2").on("scrollstop", function () {

                $("#div2").css("background", "yellow");

            });

        });

    </script>

</body>

  

</html>


<!DOCTYPE html>

<html>

  

<head>

    <title>scroll event</title>

    <link rel="stylesheet" href=

    <script src=

    </script>

</head>

  

<body>

    <div style="display: flex; 

        justify-content: center; margin-top: 120px">

        <div>

            <h3>scroll start example</h3>

            <div style="

            width: 500px;

            height: 120px;

            border: 1px solid black;

            overflow: scroll;

            margin-right: 20px;

            color: red;

          " id="div1">

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks! 

                Welcome to GeeksforGeeks!

            </div>

        </div>

        <div>

            <h3>scroll stop example</h3>

            <div style="

            width: 500px;

            height: 120px;

            border: 1px solid black;

            overflow: scroll;

            color: red;

          " id="div2">

                A Computer Science portal for 

                geeks. It contains well written, 

                well thought and well explained

                computer science and programming 

                articles, quizzes and practice/

                competitive programming/company 

                interview Questions. A Computer 

                Science portal for geeks. It 

                contains well written, well thought 

                and well explained computer science 

                and programming articles, quizzes 

                and practice/competitive programming/

                company interview Questions. A 

                Computer Science portal for geeks. 

                It contains well written, well

                thought and well explained computer 

                science and programming articles, 

                quizzes and practice/competitive 

                programming/company interview Questions.

            </div>

        </div>

    </div>

  

    

    <script>

        $(document).ready(function () {

            $("#div1").on("scrollstart", function () {

                $("#div1").css("background", "lightgreen");

            });

            $("#div2").on("scrollstop", function () {

                $("#div2").css("background", "yellow");

            });

        });

    </script>

</body>

  

</html>

FOLLOW US ON GOOGLE NEWS

Read original article here

Denial of responsibility! Techno Blender is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – [email protected]. The content will be deleted within 24 hours.

Leave a comment