There are a lot of resources on this kind of question, especially on this site, but none of them quite fit what I want.
I'm writing a .NET application using asp.net and C# (is there a better way to express that sentiment?). I need to implement this functionality:
1) When I click and hold an item, it causes the item to "vanish" (e.g. I am able to modify its visible attribute, or clear its text) 2) Releasing the event on anything that I d开发者_开发技巧on't intend as a drop box causes it to be released, and appear in its original location. 3) I can do this functionality for any object of any class, not just items in a list or something.
How should this be done? Purely client side, with jQuery?
Or does it make more sense to use AJAX? Every tutorial I've seen about doing this with AJAX is years old and use stuff like Microsoft.Web.Previews.dll, which no longer exists. They've also all shown how to do it with visual basic, but that's not a big deal.
I would use javascript on the client side with the assistance of jquery and jquery ui. Jquery ui has support for drag and drop which works quite nicely and is commonly used so the bugs get fixed quickly resulting in a solid library. http://jqueryui.com/demos/draggable/
精彩评论