jQuery find method


jQuery find() method is used to get all descendant elements of the selected element.


Syntax : jQuery find() method

$(selector).find(filter);

filter:
– An element or string which contains the selector expression to match the elements.

jQuery find method Example

jQuery find() Method Example with Syntax

<script type="text/javascript">
         $(document).ready(function(){ 
             $("li.second-li").find("li").css("background","yellow");          
          });
</script>

Try it »


Advertisements

Add Comment

📖 Read More