script.aculo.us is a JavaScript library built on the Prototype JavaScript Framework, providing dynamic visual effects and user interface elements via the Document Object Model.
It is most notably included with Seaside and Ruby on Rails, but also provided separately to work with other web application frameworks and scripting languages.
<html>
<head>
<title>script.aculo.us examples</title>
<script type="text/javascript"
src="/javascript/prototype.js"></script>
<script type="text/javascript"
src="/javascript/scriptaculous.js?load=effects"></script>
<script type="text/javascript">
function ShrinkEffect(element){
new Effect.Shrink(element, {duration:3});
}
function ShowImage(element){
new Effect.Appear(element,{duration:1, from:1, to:1.0});
}
</script>
</head>
<body>
<div onclick="ShowImage('myimage')">
Click me to display the image
</div>
<br />
<div id="myimage" onclick="ShrinkEffect(this);">
<img src="/images/scriptaculous.gif" alt="script.aculo.us" />
<h2>Click me to Shrink me out</h2>
</div>
</body>
</html>
Thursday, April 16, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment