This method clones the position and/or dimensions of source onto element as defined by the optional argument options.
element.clonePosition(source[, options]);
Here is the list of possible options:
<html> <head> <title>Prototype examples</title> <script type="text/javascript" src="/javascript/prototype.js"> </script> <script> function clonePosition(){ var firstElement = $('firstDiv'); var secondElement = $('secondDiv'); secondElement.clonePosition( firstElement); } </script> </head> <body> <p>Click Clone Position button to see the result.</p> <div id="firstDiv"> <p>This is first paragraph</p> </div> <div id="secondDiv"> <p>This is second paragraph</p> </div> <br /> <input type="button" value="Clone Position" onclick="clonePosition();"/> </body> </html>
To understand it in better way you can Try it yourself.
Advertisement