Nel tutorial di oggi dedicato allo sviluppo di applicazioni web per iPhone, imparerete come effettuare un Drag and Drop sugli elementi presenti del vostro sito.

 
node.ontouchmove = function(e){
if(e.touches.length == 1){ // Only deal with one finger
var touch = e.touches[0]; // Get the information for finger #1
var node = touch.target; // Find the node the drag started from
node.style.position = "absolute";
node.style.left = touch.pageX + "px";
node.style.top = touch.pageY + "px";
}
}
 

Share on FacebookCondividi su facebook

fonte: www.sastgroup.com » Vai al post originale