使用AJAX与拖放jQuery插件
16lz
2021-01-22
Based off of this Drag/Drop example
基于此拖放示例
If I want to increment the the value (vote) in one of my database tables after the Draggable is Dropped to its container, would I just use $.ajax() within this block below?
如果我想在将Draggable拖放到其容器后在我的一个数据库表中增加值(投票),我是否只在下面的这个块中使用$ .ajax()?
drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) .find( "p" ) .html( "Dropped!" ); }
or would that method not work with this particular plugin?
或者该方法不适用于此特定插件?
1 个解决方案
#1
1
Yes, that would work.
是的,那会有用。
drop: function( event, ui ) {
$( this )
.addClass( "ui-state-highlight" )
.find( "p" )
.html( "Dropped!" );
$.ajax(/*** your code ***/);
}
更多相关文章
- PHP之依赖注入容器pimple
- PHP实现WebSocket示例
- PHP基础示例:商品信息管理系统v1.1[转]
- 040-PHP使用闭包函数来进行父实例的变量自增,正确示例
- mysql锁机制之示例讲解
- MySQL 示例数据库sakila
- MySQL官网示例数据库emploees分析使用
- 高德地图api接口poi检索示例----并在信息框显示经纬度
- Objective-C方法/函数调用。 (来自javascript示例)