draggable and droppable example

以下是一个拖拽的例子(在参考jquery ui拖拽中的demo中,有很多好的例子)。在drop方法中,ui.draggable用于获取被拖的jquery对象。




 
 jQuery UI Droppable - Shopping Cart Demo
 
 
 
 
 
 
 
 
 
 
 
 


 

 

Products

 
 

  

T-Shirts


  

   

        
  • Lolcat Shirt

  •     
  • Cheezeburger Shirt

  •     
  • Buckit Shirt

  •    

  

  

Bags


  

   

        
  • Zebra Striped

  •     
  • Black Leather

  •     
  • Alligator Leather

  •    

  

  

Gadgets


  

   

        
  • iPhone

  •     
  • iPod

  •     
  • iPad

  •    

  

 


 

Shopping Cart


 

  

       
  1. Add your items here

  2.   

 

 


Demonstrate how to use an accordion to structure products into a catalog and make use drag and drop for adding them to a shopping cart, where they are sortable.



转载于:https://www.cnblogs.com/wangle1001986/archive/2012/08/16/2643207.html

你可能感兴趣的:(ui,javascript)