use data attribute data-sortable to toggle sorting
This commit is contained in:
parent
995b809cce
commit
e670dc202b
|
@ -147,7 +147,7 @@ jQuery( function( $ ) {
|
|||
|
||||
$( this ).select2( select2_args ).addClass( 'enhanced' );
|
||||
|
||||
if( select2_args.multiple == true ){
|
||||
if( $( this ).data( 'sortable' ) == true ){
|
||||
$( this ).select2( 'container' ).find( 'ul.select2-choices' ).sortable({
|
||||
containment: 'parent',
|
||||
start: function() { $( this ).select2( 'onSortStart' ); },
|
||||
|
@ -227,7 +227,7 @@ jQuery( function( $ ) {
|
|||
|
||||
$( this ).select2( select2_args ).addClass( 'enhanced' );
|
||||
|
||||
if( select2_args.multiple == true ){
|
||||
if( $( this ).data( 'sortable' ) == true ){
|
||||
$( this ).select2( 'container' ).find( 'ul.select2-choices' ).sortable({
|
||||
containment: 'parent',
|
||||
start: function() { $( this ).select2( 'onSortStart' ); },
|
||||
|
|
Loading…
Reference in New Issue