each Method in jQuery

 <!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>each Method</title>
</head>

<body>
    <h1>jQuery each() Method</h1>

    <ul>
        <li>Orange</li>
        <li>Apple</li>
        <li>Banana</li>
        <li>Grapes</li>
    </ul>
    <script src="js/jquery-3.7.1.min.js"></script>
    <script>
        $(document).ready(function () {
            $("li").each(function () {
                // console.log($(this).text());

                $(this).text("Hello");
            });
        });
    </script>
</body>

</html>



Comments

Popular posts from this blog

Basic Syntax in jQuery

Event "Target" Property in jQuery