$(function  () {
  var oldContainer;
	var group = $("ol.serialization").sortable({
	  group: 'serialization',
	  // afterMove: function (placeholder, container) {
	  //   if(oldContainer != container){
	  //     if(oldContainer)
	  //       oldContainer.el.removeClass("active");
	  //     container.el.addClass("active");

	  //     oldContainer = container;
	  //   }
	  // },
	  onDrop: function ($item, container, _super) {
	    var data = group.sortable("serialize").get();
	    console.log(data);
	    var jsonString = JSON.stringify(data, null, ' ');

	    $('#serialize_output2').text(jsonString);
	    _super($item, container);
	  }
	});
});