How does jQuery.find() method work in jQuery?

jQueryWeb DevelopmentFront End Technology

The jQuery.find() method will return the descendant elements of the selected element.


You can try to run the following code to learn how to work with jQuery.find() method,

Live Demo

<!DOCTYPE html>
.myclass * {
    display: block;
    border: 2px solid red;
    padding: 2px;
    margin: 10px;
    color: red;
<script src=""></script>
     $("ol").find("span").css({"background-color": "yellow", "border": "5px solid green"});

<body class="myclass">body
  <div style="width:500px;">div
        <span>The descendant element</span>

Updated on 09-Dec-2019 09:01:28