Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Configuring SortableJS Options | Introduction to Drag and Drop and SortableJS
SortableJS Drag and Drop Interfaces with JavaScript

bookConfiguring SortableJS Options

When working with SortableJS to create interactive lists, you can fine-tune the user experience by configuring several important options. Three commonly used options are animation, handle, and filter. The animation option controls the smoothness and speed of the movement when a list item is dragged and dropped. By setting a value in milliseconds, you can make the transition between positions look more fluid, which can help users understand where items are moving.

The handle option lets you specify a particular part of each list item that acts as the area for starting a drag action. This is especially useful when you want to prevent accidental sorting—users must click and drag only on the designated handle, not anywhere on the item. You define the handle by assigning a CSS selector that matches an element inside each sortable item.

The filter option allows you to exclude certain elements from being draggable or sortable. For instance, if your list items contain buttons or links, you might want to prevent users from dragging these parts. By providing a selector to the filter option, you can ensure that elements matching this selector will not trigger sorting, making your list safer and more intuitive to use.

These options give you precise control over how users interact with your sortable lists, making your drag-and-drop interfaces both functional and user-friendly.

index.html

index.html

style.css

style.css

copy
question mark

According to the overview of SortableJS options, what does the 'handle' option allow you to do?

Select the correct answer

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 3

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

bookConfiguring SortableJS Options

Свайпніть щоб показати меню

When working with SortableJS to create interactive lists, you can fine-tune the user experience by configuring several important options. Three commonly used options are animation, handle, and filter. The animation option controls the smoothness and speed of the movement when a list item is dragged and dropped. By setting a value in milliseconds, you can make the transition between positions look more fluid, which can help users understand where items are moving.

The handle option lets you specify a particular part of each list item that acts as the area for starting a drag action. This is especially useful when you want to prevent accidental sorting—users must click and drag only on the designated handle, not anywhere on the item. You define the handle by assigning a CSS selector that matches an element inside each sortable item.

The filter option allows you to exclude certain elements from being draggable or sortable. For instance, if your list items contain buttons or links, you might want to prevent users from dragging these parts. By providing a selector to the filter option, you can ensure that elements matching this selector will not trigger sorting, making your list safer and more intuitive to use.

These options give you precise control over how users interact with your sortable lists, making your drag-and-drop interfaces both functional and user-friendly.

index.html

index.html

style.css

style.css

copy
question mark

According to the overview of SortableJS options, what does the 'handle' option allow you to do?

Select the correct answer

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 3
some-alt