Add

Lorem ipsum

Lorem ipsum

Design

3 min

How to make elements draggable with drag and drop in Webflow

Learn how to make elements draggable in Webflow with jQuery UI.

In this tutorial, Sandro, co-founder of Gemeos Webflow agency, shows you how to make elements draggable with drag and drop in Webflow using jQuery UI.

Example

Move me!
Drag the element inside the area
StepWhereAction
1Page Settings > HeadLoad jQuery UI from cdnjs
2Webflow DesignerAdd the draggable-element class
3Footer codeInitialize .draggable()

1. Load jQuery UI in the head

In Page Settings > Custom Code > Head, add:

2. Add the class to your element

In the Webflow Designer, add the draggable-element class to the element you want to make draggable.

3. Initialize it in Footer code

$(function() {
$('.drag').draggable({
});
});

good to know

The library is heavy (~250 KB), so load it only on the pages where you use .draggable(), via the Page Settings for each relevant page.

Conclusion

Two lines of code for native, robust drag and drop. See also: make an element draggable in Webflow.

Published on

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...