torecards.blogg.se

Th object as element
Th object as element








th object as element

Sets the visual opacity of an element while working around inconsistencies in various browsers.Ĭollects all of element's siblings and returns them as an array of extended elements. Takes an arbitrary number of CSS selectors (strings) and returns an array of extended descendants of element that match any of them. Scrolls the window so that element appears at the top of the viewport. Replaces element by the content of the html argument and returns the removed element. Removes element's CSS className and returns element. Turns element into an relatively-positioned element without changing its position in the page layout.Ĭompletely removes element from the document and returns it. Recursively collects elements whose relationship is specified by property.

th object as element

Returns the value of element's attribute or null if attribute has not been specified. Returns element's previous sibling that matches the given cssRule.Ĭollects all of element's previous siblings and returns them as an array of extended elements. Returns element's offset relative to its closest positioned ancestor. Registers an event handler on element and returns element. Returns element's following sibling that matches the given cssRule.Ĭollects all of element's next siblings and returns them as an array of extended elements. Returns element.Ĭhecks if element matches the given CSS selector. Returns element.Īllows for the easy creation of CSS containing block by setting element's CSS position to 'relative' if its initial position is either 'static' or undefined. Simulates the poorly supported CSS clip property by setting element's overflow value to 'hidden'. Returns the debug-oriented string representation of element. Inserts content before, after, at the top of, or at the bottom of element. Collects all of the element's immediate descendants (i.e., children) and returns them as an array of extended elements. Returns element's id attribute if it exists, or sets and returns a unique, auto-generated id.ĭeprecated. Property can be specified in either of its CSS or camelized form.įinds and returns the computed width of element.Ĭhecks whether element has the given CSS className. Returns the given CSS property value of element. If none is found, the body element is returned. Returns element's closest positioned ancestor. Please use $$().įinds and returns the computed height of element. Takes an arbitrary number of CSS selectors (strings) and returns an array of extended children of element that match any of them. Fetches all of element's descendants, which have a CSS class of className and returns them as an array of extended elements. This is opposed to firstChild DOM property, which will return any node.įinds the computed width and height of an element and returns them as key/value pairs of an object.ĭeprecated. Returns the first child that is an element. Tests whether element is empty (i.e., contains only whitespace).Įxtends element with all of the methods contained in Element.Methods and .įires a custom event with the current element as its target. If no descendant matches these criteria, undefined is returned. If no cssRule is provided, all descendants are considered.

th object as element th object as element

Returns element's first descendant that matches cssRule. Returns the offsets of element from the top left corner of the document.Ĭalculates the cumulative scroll offset of an element in nested scrolling containers.Ĭhecks if the element is a descendant of ancestor.Ĭollects all of element's descendants and returns them as an array of extended elements. Returns element.Ĭlones the position and/or dimensions of source onto element as defined by the optional argument options. Removes all of element's text nodes, which contain only whitespace. Returns a new instance of ClassNames, an Enumerable object used to read and write CSS class names of element. Makes it possible to mix in your own methods to the Element object, which you can later use as methods of extended elements.įinds all siblings of the current element that match the given selector(s).Ĭollects all of element's ancestors and returns them as an array of extended elements.Ĭollects all of the element's children and returns them as an array of extended elements.ĭeprecated. Turns element into an absolutely-positioned element without changing its position in the page layout.Īdds the given CSS class name to the element's class names. NOTE − Make sure you have at least version 1.6 of prototype.js. So, writing Element.show('firstDiv') is the same as writing $('firstDiv').show() Prototype Element Method All the methods defined here are automatically added to any element accessed using the $() function. Here is the list of all the utility functions with examples. The Element object provides various utility functions for manipulating elements in the DOM.










Th object as element