alquanto probabile che NON sia lo script completo, quello lo trovi qui: http://mootools.net/download/get/moo...2.1-core-nc.js ( è quello non compresso, ti conviene usarlo se fai delle prove, poi in produzione lo cambi con quello compresso: http://mootools.net/download/get/moo...2.1-core-yc.js )
Mentre i plugin come Fx.Elements lo devi scaricare con il builder: http://mootools.net/more
Ti conviene prendere tutto in modo che per fare le prove vada tutto al primo colpo.
Prova ad usare quelli, poi per far andare Fx.Elements:
codice:
<style type="text/css">
#myOtherElement a{
display: block;
width: 150px;
height: 50px;
float: left;
}
.Blue{
background-color: blue;
}
.Red{
background-color: red;
}
.Green{
background-color: green;
}
</style>
<script type="text/javascript" src="js/mootools-1.2.1-core-nc.js"></script>
<script type="text/javascript" src="js/mootools-1.2-more.js"></script>
<script type="text/javascript">
var maxWidth = 200, minWidth = 125, normalWidth = 150;
window.addEvent('domready', function(){
var allElements = $$("#myOtherElement a");
var myFX = new Fx.Elements(allElements);
allElements.each(function(item, ind){
item.addEvents({
'mouseenter' : function(){
var obj = {};
allElements.each(function(i, index){
if(index == ind){
obj[index] = {'width' : maxWidth};
}else{
obj[index] = {'width' : minWidth};
}
});
myFX.start(obj);
}
});
});
$$('#myOtherElement div').getLast().addEvent('mouseleave' , function(){
var obj = {};
allElements.each(function(i, index){
obj[index] = {'width' : normalWidth};
})
myFX.start(obj);
})
});
</script>
<div id="myOtherElement">
<span>Menu</span>
<div>
Menuelement 1
Menuelement 2
Menuelement 3
</div>
</div>