makeClipping :: Element

makeClipping(element) -> HTMLElement

 

Simulates the poorly supported CSS clip property by setting element's overflow value to 'hidden'. Returns element.

 

To undo clipping, use 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

 

See also

 

Element: undoClipping | setStyle


Prototype API 1.5.0 - prototypejs.org