jQuery Simple object access


$("element:first")

Get the first element of an HTML page, such as $("div:first") that get the first div

$("element:last")

Get the last element of an element in an HTML page, such as $("div:last") to get the last div

$("element:not(selector)")

Removes all elements that match the given selector, such as $("input:not(:checked)") means that all unchecked checkboxes are selected

$("element:even")

Get even rows, counting from 0

$("element:odd")

Get odd lines, counting from 0

$("element:eq(index)")

Matches an element with a given index value, counting from 0, such as $("div:eq(3)"), to get the 4th div in the HTML

$("element:gt(index)")

Matches all elements that are greater than the given index, counting from 0, such as $("p:gt(3)"), to get the index 3, which is the 4th p,

$("element:lt(index)")

Matches all elements that are less than the given index value, counting from 0, such as $("p:lt(3)") means getting the index 3, which is the 3rd p,

Note: If the above two methods greater than the number less than the number can not remember, think of the HTML tags in the [>] and [<] (brackets in the content to remove the space) on the line Kazakhstan.

$(":header")

Matches elements such as h1, h2, h3 ... headers

$("element:animated")

Matching all the elements in the implementation of animation effects (on the animation, will be mentioned later, in this just a mention, do not need to care about, do not understand it does not matter)




Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.
TwitterGoogle+Facebook