Alexis_D Alexis_D - 6 months ago 8
Javascript Question

Sortable working with 1.7.2 but not with 1.11.2

I use sortable function to be able to sort some textareas (I want to be able to sort textarea and to color text inside those textarea.)

It is working fine when using 1.7.2 version of jQuery, but it is not working anymore when using jQuery 1.11.2

here my code in js.do (the code is with 1.7.2, but if you change 7 for 11 the sortable functionality wont be working anymore)

Here line 29,30,31 of my code

//LINES_ISSUE_START
$('.sortable').sortable({
cancel: '.textarea,.block_bouton_color'
});
//LINES_ISSUE_END


Any idea about how to fix it?

Answer

You have to change this

cancel: '.textarea,.block_bouton_color,',

to this

 cancel: '.textarea,.block_bouton_color'

and include the jQuery migrate plugin.