html5 - How to JQuery Drap and drop multiple/update msg on drop -


i have project - simple game, far can drag , drop need same draggable image - when dropped - update display in drop div...

<script type="text/javascript" src="game/js/jquery1.5.min.js"></script> <script type="text/javascript" src="game/js/jquery-ui1.8.min.js"></script>      $( init );  function init() {       $('#drag').draggable( {                     containment: '#content',                     cursor: 'move',                     snap: '#content',                     revert: true                 })        $('#drop').droppable( {              drop: handledropevent       } )      }  function handledropevent( event, ui ) {   var draggable = ui.draggable;   //replace image....   var num = 5;   num--;          $(this).html('<img src="game/images/watermelon_-'+num+'.png">').data(    );      //call php game->points(); points... } 


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -