jQuery UI sortable refresh doesn't work after appending new element

jQuery UI sortable refresh doesn't work after appending new element

So once I append a new list of elements they are no longer sortable. I've tried to use sortable("refresh") but it still doesnt work.

So once I append a new list of elements they are no longer sortable. I've tried to use sortable("refresh") but it still doesnt work.

$(function() {
    $(".test").on('click', function(event) {
      $(this).parent().append('<ul class="sortList"><li>123</li></ul>');
      $(".sortList").sortable('refresh');
    })

$(".sortList").sortable({
    connectWith: ".sortList"
}).disableSelection();

});

Here is a jsfiddle http://jsfiddle.net/6nL0rm1a/5/ showing my problem. As you see if you click the button a new list is added. But you cant sort/drag & drop its items to other lists.

I want the items of the appended list to be draggable & droppable. Also sortable

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Understand and Use JavaScript's .forEach() vs. jQuery's .each()

There are two functions to deal with an array on the client-side – JavaScript's .forEach() and jQuery's .each(). Here, I will teach you how to use both of these methods with some sample code.

jQuery vs Vanilla JavaScript - Beau teaches JavaScript

When should you use jQuery instead of vanilla JavaScript? Is jQuery still relevant? What is jQuery good for? jQuery vs vanilla JavaScript - Beau teaches JavaScript

3 JavaScript libraries to replace jQuery

Ubiquitous jQuery has been outmoded by JavaScript and browser advances. Cash, Zepto, and Syncfusion are three JavaScript libraries picking up where jQuery left off