JQUERY


05

Apr 2016

jQuery context Property

The context property contains the original context passed to jQuery, which could be a DOM node context, or, if no node is passed, the document context. Syntax : context OUTPUT : Context: Note: The context property was deprecated in jQuery version 1.10.


05

Apr 2016

jQuery $.post() Method

The $.post() method requests data from the server using an HTTP POST request. Syntax: $.post(URL,data,callback); OUTPUT: Send an HTTP POST request to a page and get the result back


05

Apr 2016

jQuery – AJAX get() and post() Methods

The jQuery get() and post() methods are used to request data from the server with an HTTP GET or POST request. HTTP Request: GET vs. POST Two commonly used methods for a request-response between a client and server are: GET and POST. GET – Requests data from a specified resource POST – Submits data to be processed to a specified resource OUTPUT: Send an HTTP...

Read More


05

Apr 2016

jQuery Traversing – Ancestors

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) li (direct parent) span div (grandparent) p (direct parent) span


05

Apr 2016

Traversing in jQuery

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, or just inside context elements if the context parameter is specified. Syntax $(selector).add(element,context) OUTPUT: Welcome...

Read More


05

Apr 2016

jQuery outerWidth() and outerHeight() Methods

The outerWidth() method returns the width of an element (includes padding and border). The outerHeight() method returns the height of an element (includes padding and border). OUTPUT: Display dimensions of div outerWidth() – returns the width of an element (includes padding and border). outerHeight() – returns the height of an element (includes padding and border).


04

Apr 2016

jQuery innerWidth() and innerHeight() Methods

OUTPUT: Display dimensions of div innerWidth() – returns the width of an element (includes padding). innerHeight() – returns the height of an element (includes padding).


04

Apr 2016

jQuery Dimension Methods

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.


04

Apr 2016

Set Multiple CSS Properties

To set multiple CSS properties, use the following syntax: css({“propertyname“:”value“,”propertyname“:”value“,…}); OUTPUT: This is a heading This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. Set multiple styles for p


04

Apr 2016

Set a CSS Property

o set a specified CSS property, use the following syntax: css(“propertyname“,”value“); OUTPUT: This is a heading This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. Set background-color of p



Page 1 of 512345