</>
Skip to content
jQuery lessons (34/39)

jQuery — UI

What is jQuery UI?

jQuery UI is a set of UI interactions, effects, widgets, and themes built on top of jQuery.

<link rel="stylesheet" href="jquery-ui.min.css">
<script src="jquery-ui.min.js"></script>

Draggable

$("#box").draggable();

Droppable

$("#dropzone").droppable({
    drop: function(event, ui) {
        $(this).addClass("highlight");
    }
});

Resizable

$("#box").resizable();

Sortable

$("#list").sortable();

Datepicker

$("#date").datepicker({
    dateFormat: "yy-mm-dd",
    minDate: new Date()
});

Accordion

$("#accordion").accordion();

Tabs

$("#tabs").tabs();

Dialog

$("#dialog").dialog({
    title: "Hello",
    buttons: {
        OK: function() { $(this).dialog("close"); }
    }
});

Mini Practice

  1. Make an element draggable
  2. Create a sortable list
  3. Add a datepicker to a form
  4. Build a dialog with buttons

Up Next

Continue with Validation — form validation with jQuery.

Related Topics

Frequently Asked Questions about UI

What is UI in jQuery?

UI is a fundamental concept in jQuery. This lesson explains it step by step with clear examples, making it easy for beginners to understand.

How do I learn UI?

Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn UI.

Why is UI important in jQuery?

UI is essential for jQuery development. Understanding this concept will help you write better code and solve real-world problems more effectively.