---
title: "jQuery's children() method"  
description: "jQuery's children() method"  
author: "Ethan Karla"  
published: 2021-07-28  
updated: 2021-07-28  
canonical: https://www.mindstick.com/forum/156632/jquery-s-children-method  
category: "jquery"  
tags: ["jquery"]  
reading_time: 2 minutes  

---

# jQuery's children() method

What is the use of jQuery's [children](https://yourviews.mindstick.com/view/81386/mobile-app-based-education-curse-or-boon-for-our-children)() [method](https://www.mindstick.com/forum/166/webservice-method)?

## Replies

### Reply by Anonymous User

jQuery chidren() method is an inbuilt method in jQuery which is use to find the children element of the selector element.

It's Syntax is :

```
$(selector).children()
```

Let's take a look at below example for better understanding :

```
<!DOCTYPE html>
<html lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
    <meta charset='utf-8' />
    <title>Children Method in jQuery</title>
    <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script>
    <script>
        $(document).ready(function () {
            $('div').children().css({
                'background-color': 'yellow',
                'padding': '10px',
                'border': '2px solid blue'
            });
        });
    </script>
</head>
<body>
    <div class='parent' style='width:500px;'>Parent Class!!
        <p>This is first child
            <span>This is grandchild</span>
        </p>
        <p>This is Second children
            <span>This is grandchild</span>
        </p>
    </div>
</body>
</html>
```

Hope this will help you.

Happy Coding!


---

Original Source: https://www.mindstick.com/forum/156632/jquery-s-children-method

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
