I got a div with id="small_matrix_container" surrounding 814 links
with images.
When I attach a mouseovereffect with
Event.observe("small_matrix_container", 'mouseover', function ......
the resulting effect comes fast on the bottom of the page on the last
images and get's slower when I go to the top of the page.
How does observe works ? Is there is stack where the last Objects are
found fast and the first take long time to look up. Does somebody know
a better way to solve this.
the code is on http://shishabrand.com/dudism/
there are the 814 images and two functions
Event.observe("small_matrix_container", 'mouseover', function(event) {
var element = Event.element(event);
if ( 'IMG' == element.tagName &&
element.hasClassName('shade') )
{
element.removeClassName('shade')
element.addClassName('noshade');
}
});
Event.observe("small_matrix_container", 'mouseout', function(event) {
var element = Event.element(event);
if ('IMG' == element.tagName &&
element.hasClassName('noshade') )
{
element.removeClassName('noshade');
element.addClassName('shade');
}
});
Regards
Kai
SHISHA Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---