On Mon, Sep 19, 2011 at 8:10 PM, Ruby
<royglee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I started a new RoR 3.1 project to test this. I''ve added the
> following needed jQuery .js files to make draggable work correctly
> into my app/assests/javascripts directory.
> jquery.ui.core.js
> jquery.ui.widget.js
> jquery.ui.mouse.js
> jquery.ui.draggable.js
>
> The application.js has the default code:
> //= require jquery
> //= require jquery_ujs
> //= require_tree .
>
> I then added the .js code to make it all work into the application.js
> file:
> $(function() {
> $( "#draggable" ).draggable();
> });
>
> So this is all set.
>
> Then I use the following code in my home page:
> <div id="draggable" class="ui-widget-content">
> <p>Drag me around</p>
> </div>
>
>
> Dragging doesn''t work! The code I used is based on the jQuery
demo
> file for draggable. It works fine as a HTML file but when I put into
> my Ruby on Rails 3.1 project, it doesn''t work. What am I doing
> wrong? I''ve been pulling my hair because of this. Thanks for
your
> help!
>
Have you looked at the generated page source vs what you see in the jquery
example? Make sure that all the jquery libraries are loading. Then see what
looks different. My guess is you might not be getting your ui libs loaded.
>
> --
>
> 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.
>
>
--
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.