BTW, images will NOT morph... will just change from state 1 to state
2, no corssfade or anything... :-P
On Mon, Sep 29, 2008 at 2:07 PM, Martin Tillmann <[EMAIL PROTECTED]> wrote:
> you cannot use the collection inside the events, so botones[i] isn't
> available when the event is fired.
> Try it like this:
>
> $$('.boton-up').addEvents({
> 'mouseenter':function()
> {
> this.morph('.boton-over');
> },
> 'mouseleave':function()
> {
> this.morph('.boton-up');
> }
> });
>
>
>
> On Mon, Sep 29, 2008 at 7:28 PM, melquisedecwt <[EMAIL PROTECTED]>
> wrote:
>>
>> Hello,
>>
>> I have a problem and would like to help me.
>>
>> I'm doing a feature to apply an effect to make the mouseover all the
>> buttons with the class "button-up" that is in the web page, my
>> function is as follows:
>>
>> function botones(){
>> var botones_up = $$('.boton-up');
>> for(i = 0; i < botones_up.length; i++){
>> botones_up[i].addEvents({
>> 'mouseenter': function(){
>> botones_up[i].morph('.boton-over');
>> },
>> 'mouseleave': function(){
>> botones_up[i].morph('.boton-up');
>> }
>> });
>> }
>> }
>>
>> The function botones() the load in the domready of each document.
>>
>> document.addEvent('domready', function(){
>> botones();
>> });
>>
>> When you open the page does not perform the desired effect :(
>
>
--
◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
www.ivanicus.com