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 ***/);
}

更多相关文章

  1. PHP之依赖注入容器pimple
  2. PHP实现WebSocket示例
  3. PHP基础示例:商品信息管理系统v1.1[转]
  4. 040-PHP使用闭包函数来进行父实例的变量自增,正确示例
  5. mysql锁机制之示例讲解
  6. MySQL 示例数据库sakila
  7. MySQL官网示例数据库emploees分析使用
  8. 高德地图api接口poi检索示例----并在信息框显示经纬度
  9. Objective-C方法/函数调用。 (来自javascript示例)

随机推荐

  1. Android 中自定义View(一)
  2. android ellipsize的内容及使用
  3. Android:基础控件之(二)TextView
  4. Android的Style的使用
  5. Android(安卓)init.rc文件浅析
  6. Android(安卓)Content Provider
  7. android多媒体框架之流媒体框架----base
  8. Android Studio3.0新特性及安装详解
  9. android控件的对齐方式
  10. Android(安卓)线性布局(LinearLayout)相关