On Mon, Feb 13, 2012 at 2:01 AM, Dev Guy
<devguy.ca-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi I am learning to use jQuery but I can''t seem to get the
following
> line to work from my html.erb file
>
> <script type="text/javascript">
> document.write("<p>Hello from javascript!</p>")
> $("<p>Hello from jQuery!</p>")
> </script>
> </p>
>
>
> I see the output for the basic javascript call, but nothing from
> jQuery, what am I doing wrong?
>
> I know Rails 3.2 comes with jQuery installed and I do see it in the
Gemfile:
>
> gem ''jquery-rails''
>
>
I figured out I need to use:
$("<p>Hello from
jQuery!</p>").appendTo(''body'')
--
Kind Regards,
Rajinder Yadav
SafetyNet Test Driven Development
http://safetynet.devmentor.org
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.