Hi Nicolas

Thanks for your answer. I also tried this, but It doesnt work because
'this' argument isnt supported in this manner when observing
functions.

On Mar 5, 8:40 pm, "Nicolás Sanguinetti" <[EMAIL PROTECTED]> wrote:
> This will probably work.
>
> $$("a.dropdown").invoke("observe", "mouseover", function() {
> showSubnav(this) });
>
> -Nicolas
>
> On Wed, Mar 5, 2008 at 9:28 PM, Luke The Duke <[EMAIL PROTECTED]> wrote:
>
>
>
> >  Hi all,
>
> >  I'am new to Prototype and after a  2 hours of research I didn't find a
> >  solution for the following question:
>
> >  I have the following list:
>
> >  <ul id="navi">
> >         <li><a href="/about/">Home</a></li>
> >         <li><a href="/about/" class="dropdown"
> >  onmouseover="showSubnavi(this)">About</a>
> >                 <ul style="display:none;">
> >                         <li><a href="/history/">History</a></li>
> >                         <li><a href="/facts/">Facts</a></li>
> >                         <li><a href="/partners/">Partners</a></li>
> >                         <li><a href="/team/">Team</a></li>
> >                 </ul>
> >         </li>
> >         etc....
> >  </ul>
>
> >  What id like to do: Replace the HTML-Attribute
> >  onmouseover="showSubnavi(this)" using the prototype Event.observe. All
> >  links with the class "dropdown" should be observed for onmouseover
> >  events and execute the function showSubnavi(this) - the 'this'
> >  argument shouldn't be lost and i think thats the tricky part.
> >  Im sure the soultion includes something with bindAsEventListener, but
> >  I didn't really get that.
>
> >  Thank you alot!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to