Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag and drop: jQuery UI or Scriptaculous?

I am in the middle of the road whether to use jQuery UI or Scriptaculous for drag and drop. I am using Ruby on Rails, and Scriptaculous support in Ruby on Rails is superb with the existence of scriptaculous_helper.rb. But I have already use jQuery for the ajax and DOM manipulation. I do not mind to use scriptaculous since we can use jQuery.noConflict() in the code. I also kind of get the impression that scriptaculous drag and drop is better than jQuery UI drag and drop based on the online demos.

So back to the original question, which one would you recommend as a drag and drop library and which one do you think is better than the other? Scriptaculous or jQuery UI?

like image 650
Joshua Partogi Avatar asked May 04 '10 03:05

Joshua Partogi


People also ask

How do you drag and drop in jQuery?

Using jQuery UI, we can make the DOM(Document Object Model) elements to drag anywhere within the view port. This can be done by clicking on the draggable object by mouse and dragging it anywhere within the view port. If the value of this option is set to false, it will prevent the DOM elements to be dragged .

What is jQuery ui Why is it needed?

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

Why is draggable not working?

Check whether your draggable object is already loaded in the viewport. If it is not, it won't work properly. JUST AFTER the draggable object to be absolutely sure that everything is loaded at the correct time. When you'll be sure everything is ok, then you'll be able to refactor.


1 Answers

I've been using jQuery UI's drag & drop features and I'm pretty happy with them. Overall, they seem very well-rounded – for example, if you drag toward the top of the viewport, the page automatically scrolls up, just like users expect.

If you're already using jQuery (but not Scriptaculous), why add the weight of an additional JS framework? Bytes do count, and the more you can slim down your client-side script, the faster your app will run.

like image 158
josh3736 Avatar answered Nov 11 '22 09:11

josh3736