Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<link href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script><script src="//code.jquery.com/jquery-2.1.1.min.js"></script><div id="dropTarget" style="width:100px; height:20px; color:#CCCC"></div>
...
 
 $("#dropTarget").draggable({
  selected: $(this)});
      var container = $('<div/>').attr('id', 'draggingContainer');
      container.append(selected.clone());
      container.addClass('pffff');
      container.draggable();
      return container; 
});
  $("#dropTarget").droppable({
                accept : "#dragSource li" ,         
                drop : function(event, ui) {
                  var itemid = ui.draggable.attr("id");
                  console.log(event, ui);
                }           
            });
  
  $('#selectAll').click(function(){
    $('#dragSource input').attr('checked', 'checked');
    return false;
  });
  
  $('#selectNone').click(function(){
    $('#dragSource input').removeAttr('checked');
    return false;
  });
  
  $('#selectInvert').click(function(){
    $('#dragSource input').each(function(){
      var $this = $(this);
      if ($this.attr('checked')) {
        $this.removeAttr('checked');
      }
      else {
        $this.attr('checked', 'checked');
      }
    });
    return false;
  });
});
 
$("#dropTarget").draggable({
  selected: $(this)});
      var container = $('<div/>').attr('id', 'draggingContainer');
      container.append(selected.clone());
      container.addClass('pffff');
      container.draggable();
      //return container; 
$("#dropTarget").droppable({
                accept : "#dragSource li" ,         
                drop : function(event, ui) {
                  var itemid = ui.draggable.attr("id");
                  console.log(event, ui);
                }           
            });
  
  $('#selectAll').click(function(){
    $('#dragSource input').attr('checked', 'checked');
    return false;
  });
  
  $('#selectNone').click(function(){
    $('#dragSource input').removeAttr('checked');
    return false;
  });
  
  $('#selectInvert').click(function(){
    $('#dragSource input').each(function(){
      var $this = $(this);
      if ($this.attr('checked')) {
        $this.removeAttr('checked');
      }
      else {
        $this.attr('checked', 'checked');
      }
    });
    return false;
  });
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers