Home > UI/UX Development > jQuery (Page 2)

DOM traversing & manipulating in JavaScript

Hello everyone, in this post we will discuss about following points on Document Object Model (DOM). What is DOM? DOM traversing DOM manipulating What is DOM? The Document Object Model (DOM) is a programming API for HTML and XML. API specification defined by the World Wide Web Consortium (W3C). DOM represents how to write HTML and

This Article is TAGGED in . Read more

What is difference offset() and position()

Hello everyone, in this post we will discuss about difference between offset() and position() with example. offset() The offset() method set or returns the offset coordinates (current position) for the selected elements, relative to the document. offset() returns an object containing the properties top and left coordinate value. When positioning a new element on

This Article is TAGGED in . Read more

What is Method Chaining in JavaScript

Hello everyone, in this post we will discuss about following points on Method Chaining What is Method Chaining? Pros and Cons of Method Chaining What is method chaining? Method chaining is technique that allows to write several methods on jQuery selection in sequence in a single code statement. jQuery relies heavily on chaining. This makes it easy

This Article is TAGGED in . Read more

JavaScript Scope

Hello everyone, in this post we will discuss about following points on JavaScript Scope What is scope? What is Global/Local Scope? What is lexical scope? What is scope? In JavaScript, scope determines the accessibility (visibility). Scope refers to the current context of your code. Scopes can be globally or locally defined for both functions and variables. What is Global/Local Scope? In JavaScript there

This Article is TAGGED in . Read more

What is the difference between jQuery HTML/CSS methods width(), innerWidth(), outerWidth() and outerWidth(ture)?

Definition: width(): This method gives width of the selected element (excluding padding, border and margin). innerWidth(): This method gives width of the selected element (including padding, excluding border and margin). outerWidth(): This method gives width of the selected element (including padding and border, excluding margin). outerWidth(true): This method gives width of the selected element

This Article is TAGGED in , , , . Read more

jQuery: Difference between selectors :first, :first-child and :first-of-type

Definition: :first – use this selector to select first element. This selector select only one single element from all related elements available on the page. :first-child – use this selector to select all first child elements from each parent. :first-of-type – use this selector to select all first child elements, of a specific

This Article is TAGGED in , , , , , . Read more

jQuery: Difference between remove() and detach() methods

Definition: remove() – Removes all child elements with selected element. In this method you can restore all data but not event handlers of the removed elements from the DOM. All data and events related with elements will be removed. detach() – Removes all child elements with selected elements. Even though it keeps

This Article is TAGGED in , , . Read more

jQuery: Difference between parent(), parents() and parentsUntil() methods.

Definition: parent() – Use this method to get direct parent element of the current selected element. parents() – Use this method to get all parent elements of the current selected element. parentsUntil() – Us this method to get all ancestor elements between the selector and the parameter you have selected in the parentsUntil()

This Article is TAGGED in , , , . Read more

jQuery: Difference between remove(), empty() and detach() methods

jQuery Difference between remove(), empty() and detach() methods

Definition: remove() – Removes all child elements with selected element. In this method you can restore all data but not event handlers of removed elements from the DOM. All data and events related with elements will be removed. empty() – Removes all content and child elements from the selected element. This method

This Article is TAGGED in , , , . Read more