> Event.observe(window, 'load', function() { It might be better to listen to 'dom:loaded' event on a document (since it fires as soon as DOM is ready)
> Event.observe('emailus', 'click', getContentAlt(col2, col3)); Event.observe needs a function reference as a third argument. You probably meant to do: Event.observe('emailus', 'click', function(){ getContentAlt(col2, col3) }); // or $('emailus').observe('click', function() { getContentAlt(col2, col3) }); > function getContentAlt(col2, col3) { > > if ($(this).hasClassName('current')) { > > return false; > > } return false; wouldn't work in Event.observe. You need to use Event.stop(event). Best, kangax --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---