This is a frequently asked question in JQuery interview questions.   .children([selector]) is to get all the children elements of an element, and the selector can be to select className of the element. The following statement is to get all the children with class name “x”. $("#parent").children( ".x" ).hide();