Im playing with drag and drop elements before i start to code this room thing,
But i cant get it to drag at all.
my code:
Any help would be appreciatedHTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Drag&Drop</title> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js"></script> <script type="text/javascript"> Droppables.add('area',{ondrop: function() { document.getElementById("text").innertHTML= "Dropped";} }); new Draggable('drag',{ghosting:true}); </script> </head> <body> <div id="area" style="width:100%; height:500px;"> <div id="drag" style="background-color:#009999; width:100px;">Drag Moi!</div> </div><br /> <span id="text" style="background-color:#FFFF99;">Item Not Dropped.</span> </body> </html>![]()





Reply With Quote



