jQuery Intro

jQuery Intro Quiz

jQuery Intro Exercise

jQuery Basic

jQuery Basic Quiz

jQuery Basic Exercise

jQuery Advance

jQuery Advance Quiz

jQuery Advance Exercise

jQuery Selectors

jQuery Effects

jQuery Events

jQuery Methods and Properties

jQuery Traversing

jQuery CSS and HTML Methods

jQuery contents() Method

jQuery contents() Method



The contents() method is used to return all direct children, including text and comment nodes, of the selected element. A text node is an actual text displayed by an element. It is similar to the children() method but it returns comment nodes and text nodes with it.




Its syntax is:- $(selector).contents()

Code Explanation

All Tutorials related to jQuery Traversing

All Sections related to Jquery