Created
May 13, 2012 05:46
-
-
Save wycks/2685422 to your computer and use it in GitHub Desktop.
Jquery UI drag and drop counter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$( "#drag-me" ).draggable(); | |
$( "#drop" ).droppable({ | |
drop: function( event, ui ) { | |
$( this ) | |
.addClass( "ui-state-highlight" ) | |
.find( "p" ) | |
$('#counter').html(function(i, val) { | |
return val * 1 + 1 | |
}); | |
} | |
}); | |
}); | |
//http://jsfiddle.net/hRznb/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment