class method Element.clonePosition
Element.clonePosition(element, source[, options]) → Element
-
source
(Element
|String
) – The source element (or its ID). -
options
(Object
) – The position fields to clone.
Clones the position and/or dimensions of source
onto the element as
defined by options
, with an optional offset for the left
and top
properties.
Note that the element will be positioned exactly like source
whether or
not it is part of the same CSS containing
block.
Options
Name | Default | Description |
---|---|---|
setLeft |
true |
Clones source 's left CSS property onto element . |
setTop |
true |
Clones source 's top CSS property onto element . |
setWidth |
true |
Clones source 's width onto element . |
setHeight |
true |
Clones source 's width onto element . |
offsetLeft |
0 |
Number by which to offset element 's left CSS property. |
offsetTop |
0 |
Number by which to offset element 's top CSS property. |
This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.