<style type="text/css">
.basket{
border:transparent solid 2px;
}
img{
width:80px;
height:80px;
}
.hover{
border-color:red;
}
</style> <h2>商品</h2>
<div id="b1" style="height:80px;width:100%;background-color:gainsboro;"> <img src="~/Content/images/1.bmp" />
<img src="~/Content/images/2.bmp" />
<img src="~/Content/images/3.bmp" />
<img src="~/Content/images/4.bmp" />
</div>
<h2>购物车</h2>
<div id="shop">
<img src="~/Content/images/cart.png" class="basket" width="" height=""/>
</div> <script> $("#b1 img").draggable({
revert: "invalid"
});
$("#shop img.basket").draggable({
disabled:"true"
})
$("#shop img.basket").droppable({
hoverClass: "hover",
drop: function (e, ui) {
$("#shop").append(ui.draggable);
$(ui.draggable).css({
position: "relative",
top: "0px",
left: "0px"
}).addClass("bought");
}
}); $("#b1").droppable({
accept:".bought",
drop: function (e, ui) {
$("#b1").append(ui.draggable);
$(ui.draggable).css({
position: "relative",
top: "0px",
left: "0px"
}).removeClass("bought");
}
}); </script>

最新文章

  1. Sigmaplot 13 破解版什么地方可以下载
  2. myeclipse 第一步
  3. Fiddler 手机端证书安装No root certificate was found
  4. 「2014-2-23」Note on Preliminary Introduction to Distributed System
  5. mysql win源码比较大 不需要的文件删除 记录下来
  6. Asp.net中的ajax回调模式(ICallbackEventHandler)
  7. Oracle private dblink和pubic dblink
  8. ASP.NET页面周期
  9. 得到一个div下 特定ID的所有标签
  10. c_select 调用参数说明
  11. 高性能日志类KLog(已开源代码)
  12. influxdb + Grafana可视化监控平台
  13. C/C++中的输入输出重定向
  14. vue2.4+vue-cli+webpack history模式打包后 刷新404
  15. Python_collections_namedtuple可命名元组
  16. python基础(6)-深浅拷贝
  17. Learning-Python【20】:Python常用模块(3)—— shelve、pickle、json、xml、configparser
  18. CodeForces - 444C
  19. 049 CDH商业版本的搭建(hadoop5.3.6 +hive+sqoop)
  20. python引入模块

热门文章

  1. VUEX action解除页面耦合
  2. ARGB,RGB颜色值表示
  3. 轻量级批量Omnitty工具安装和简单使用
  4. 阿里云Ubuntu部署java web(1) - 系统配置
  5. 关于Address already in use: connect问题分析及解决方案
  6. 嵌入式Linux内核+根文件系统构建工具-Buildroot 快速入手指导【转】
  7. YTU 2811: 打鱼还是晒网
  8. web项目开发 之 前端规范 --- HTML编码规范
  9. redhat修复hostname主机名
  10. idea项目文件名为红色的解决办法