Reputation: 2269
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?
drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) .find( "p" ) .html( "Dropped!" ); }
or would that method not work with this particular plugin?
Upvotes: 0
Views: 959
Reputation:
Yes, that would work.
drop: function( event, ui ) {
$( this )
.addClass( "ui-state-highlight" )
.find( "p" )
.html( "Dropped!" );
$.ajax(/*** your code ***/);
}
Upvotes: 1