Category

JQUERY

jQuery Traversing – Ancestors

By | JQUERY | No Comments

An ancestor is a parent, grandparent, great-grandparent, and so on. With jQuery you can traverse up the DOM tree to find ancestors of an element. Traversing Up the DOM Tree Three useful jQuery methods for traversing up the DOM tree are: parent() parents() parentsUntil() OUTPUT : div (great-grandparent) ul (grandparent)…

Read More

Traversing in jQuery

By | JQUERY | No Comments

jQuery traversing, which means “move through”, are used to “find” (or select) HTML elements based on their relation to other elements. some jQuery Traversing methods : add() addBack() andSelf() children() closest The add() method adds elements to an existing group of elements. This method adds elements on the whole document,…

Read More

jQuery Dimension Methods

By | JQUERY | No Comments

Query Dimension Methods jQuery has several important methods for working with dimensions: width() height() innerWidth() innerHeight() outerWidth() outerHeight().   OUTPUT: Display dimensions of div width() – returns the width of an element. height() – returns the height of an element.

Read More