TypeError: $(...).sortable is not a function - after update


I added yii\jui\JuiAsset to my assets, I have a table to sort:








I use this JS code:

$('table tbody').sortable({

  update: function () {

   var data = $(this).sortable('toArray');



There is no error on page load, Sortable works fine. Only after update I get an error:

TypeError: $(…).sortable is not a function

I tried to change update to:

$('table tbody').sortable('toArray');

but I get the same error

Any ideas?

your problem seems like … ur page have not got required JS.

Check this for more information Check This