How can I use jQuery drag and drop on a TextBox?

I am using jQuery and want to move the text box. As in dragging it using the draggable function, and also making it droppable () to remove several properties on it. Can't I make the text box draggable nor droppable? This only becomes possible when I surround the text box with a Div. Why is this so? What is the correct way to implement both functions using a text box?

0
source share
1 answer

Input elements - This is the default drag and drop of a note, because it won’t know if you want to drag the text box or just focus on it.

cancel ,

$("#yourTextBox").draggable({ cancel: null }); 
+4

All Articles