0.5.0
Pre-release
Pre-release
New
- CSS method introduced
css
for getting or setting the style properties of an element/set of elements- supports an array of style names (e.g.
['property1', 'property2']
) to retrieve the values. Returns an object with{property1:value1, property2:value2}
style - supports setting new properties with an object like
{property1:value1, property2:value2}
- supports property names both in
property-name
andpropertyName
format. Always returns property names inpropertyName
format
- Dimension methods introduced
width
method returns the first element's width or sets the width in a set.- returns the only content width, no-borders, no-padding, no-margin
- returning value is unitless.
- sets the width as css property.
contentWidth
as alias method
innerWidth
method returns the first element's clientWidth- returns the content width with paddings included, no-borders, no-margin
- returning value is unitless.
clientWidth
as alias method
outerWidth
method returns the first element's offsetWidth- returns the content width with paddings and borders included, no-margin
- returning value is unitless.
- if called as
outerWidth(true)
, margins also included. offsetWidth
as alias method
height
method returns the first element's height or sets the heigth in a set.- returns the only content height, no-borders, no-padding, no-margin
- returning value is unitless.
- sets the height as css property.
contentHeight
as alias method
innerHeight
method returns the first element's clientHeight- returns the content height with paddings included, no-borders, no-margin
- returning value is unitless.
clientHeight
as alias method
outerHeight
method returns the first element's offsetHeight- returns the content height with paddings and borders included, no-margin
- returning value is unitless.
- if called as
outerHeight(true)
, margins also included. offsetHeight
as alias method
- Additions to traversing methods
parent
method for getting the immediate parent. Supportsselector
based selection.siblings
method for getting all siblings of the element. Supportsselector
based selection.children
method for getting all children of the element. Supportsselector
based selection.