.children() in jQuery

It helps get the children of each element in the set of matched elements, optionally filtered by a selector.

.children()

// To add border and text color of “li” in “ul”.

<ul>
  <li>style will affect here
    <span>contents</span>
  </li>
</ul>

$(document).ready(function(){
  $(“ul”).children().css({“color”:”yellow”,”border”:”2px solid yellow”});
});