when you click on the div, it is morphing to the same style that it
already has..
which would mean it wouldn't move, or visually change at all. ( i
would assume )
but it scales, changes the font size, color, etc.
It seems that it removes the style, then morphs to the assignment.
rather than taking a status of what it's state CURRENTLY is and
morphing the diff.
The same goes if you morph to a style, then morph to it again, instead
of not changing on the 2nd morph, it changes back to the original then
morphs to the assigned.. (see new example below that demonstrates
both behaviors. click on each div more than once.
Thanks!
-----------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<script src="javascripts/prototype.js" type="text/javascript"></
script>
<script src="javascripts/scriptaculous.js" type="text/javascript"></
script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.nodeA {
width:80px;
background-color:#FF3366;
border:solid #333333 thin;
margin:6px;
}
.nodeB {
width:80px;
background-color:#FF33FF;
border:solid #333333 thin;
margin:6px;
}
</style>
</head>
<body>
<div class='nodeA' id="b" onclick="this.innerHTML = this.className;
new Effect.Morph('b',{style:'nodeA'})">click me</div>
<div class='nodeA' id="a" onclick="new Effect.Morph('a',
{style:'nodeB'})">click me</div>
</body>
</html>.