Hey all,
Having a bit of a brain freeze and can''t seem to get this to work.
I''m just trying to insert loading.. after a link but I am getting
.insert is not a function.
$$(''.playVideo'').each(function(link) {
Event.observe(link,''click'',function(e){
link.insert({
after: "Loading..."
});
Event.stop(e);
});
});
Help!
Regards,
Iggy
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
It should work fine. Are you using 1.6+?
btw, if performance is not in question, you could reduce this to:
$$(''.playVideo'').invoke(''observe'',
''click'', function(e) {
e.stop()
e.element().insert({ after: ''Loading...'' });
})
- kangax
On Apr 16, 7:29 pm, Iggy Sandejas
<igg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hey all,
>
> Having a bit of a brain freeze and can''t seem to get this to work.
>
> I''m just trying to insert loading.. after a link but I am getting
> .insert is not a function.
>
> $$(''.playVideo'').each(function(link) {
> Event.observe(link,''click'',function(e){
> link.insert({
> after: "Loading..."
> });
> Event.stop(e);
> });
> });
>
> Help!
>
> Regards,
> Iggy
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
I''ll double check. kangax wrote:> It should work fine. Are you using 1.6+? > > btw, if performance is not in question, you could reduce this to: > > $$(''.playVideo'').invoke(''observe'', ''click'', function(e) { > e.stop() > e.element().insert({ after: ''Loading...'' }); > }) > > - kangax > > On Apr 16, 7:29 pm, Iggy Sandejas <igg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hey all, >> >> Having a bit of a brain freeze and can''t seem to get this to work. >> >> I''m just trying to insert loading.. after a link but I am getting >> .insert is not a function. >> >> $$(''.playVideo'').each(function(link) { >> Event.observe(link,''click'',function(e){ >> link.insert({ >> after: "Loading..." >> }); >> Event.stop(e); >> }); >> }); >> >> Help! >> >> Regards, >> Iggy >> > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Okay just checked. I''m an id1ot. :) kangax wrote:> It should work fine. Are you using 1.6+? > > btw, if performance is not in question, you could reduce this to: > > $$(''.playVideo'').invoke(''observe'', ''click'', function(e) { > e.stop() > e.element().insert({ after: ''Loading...'' }); > }) > > - kangax > > On Apr 16, 7:29 pm, Iggy Sandejas <igg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hey all, >> >> Having a bit of a brain freeze and can''t seem to get this to work. >> >> I''m just trying to insert loading.. after a link but I am getting >> .insert is not a function. >> >> $$(''.playVideo'').each(function(link) { >> Event.observe(link,''click'',function(e){ >> link.insert({ >> after: "Loading..." >> }); >> Event.stop(e); >> }); >> }); >> >> Help! >> >> Regards, >> Iggy >> > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It''s ok. We all are once in a while ; ) - kangax On Apr 17, 12:48 am, Iggy Sandejas <igg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Okay just checked. I''m an id1ot. :) > > kangax wrote: > > It should work fine. Are you using 1.6+? > > > btw, if performance is not in question, you could reduce this to: > > > $$(''.playVideo'').invoke(''observe'', ''click'', function(e) { > > e.stop() > > e.element().insert({ after: ''Loading...'' }); > > }) > > > - kangax > > > On Apr 16, 7:29 pm, Iggy Sandejas <igg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> Hey all, > > >> Having a bit of a brain freeze and can''t seem to get this to work. > > >> I''m just trying to insert loading.. after a link but I am getting > >> .insert is not a function. > > >> $$(''.playVideo'').each(function(link) { > >> Event.observe(link,''click'',function(e){ > >> link.insert({ > >> after: "Loading..." > >> }); > >> Event.stop(e); > >> }); > >> }); > > >> Help! > > >> Regards, > >> Iggy--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---