Element
- absolutize
- addClassName
- addMethods
- adjacent
- ancestors
- childElements
- classNames
- cleanWhitespace
- clonePosition
- cumulativeOffset
- cumulativeScrollOffset
- descendantOf
- descendants
- down
- empty
- extend
- fire
- firstDescendant
- getDimensions
- getElementsByClassName
- getElementsBySelector
- getHeight
- getOffsetParent
- getStyle
- getWidth
- hasClassName
- hide
- identify
- immediateDescendants
- insert
- inspect
- makeClipping
- makePositioned
- match
- next
- nextSiblings
- observe
- positionedOffset
- previous
- previousSiblings
- readAttribute
- recursivelyCollect
- relativize
- remove
- removeClassName
- replace
- scrollTo
- select
- setOpacity
- setStyle
- show
- siblings
- stopObserving
- toggle
- toggleClassName
- undoClipping
- undoPositioned
- up
- update
- viewportOffset
- visible
- wrap
- writeAttribute
makeClipping
makeClipping(element) -> HTMLElement
Simulates the poorly supported CSS clip
property by setting element
's overflow value to 'hidden'
. Returns element
.
To undo clipping, use Element.undoClipping.
The visible area is determined by element
's width and height.
Example
<div id="framer">
<img src="/assets/2007/1/14/chairs.jpg" alt="example" />
</div>
$('framer').makeClipping().setStyle({width: '100px', height: '100px'});
// -> HTMLElement