daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest May 20th, 2018 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Create new YUI instance, and populate it with the required modules
  2. YUI().use('dd', 'io', function(Y) {
  3.  
  4.  
  5.  
  6.     var items = Y.all('.dragCard');
  7.     items.plug(Y.Plugin.Drag);
  8.     items.each( function ( draggable )
  9.     { draggable.dd.plug( Y.Plugin.DDConstrained,
  10.     { constrain2node: '#viewer' });
  11.     });
  12. ///////////////////////////////////////////////////////////////////////////
  13.  
  14.     var drop = new Y.DD.Drop({
  15.         node: '#defaultSlot'
  16.     });
  17.     drop.on('drop:hit', function(e) {
  18.         var out = e.drag.get('node').get('id');
  19.         dNum = parseInt(out.match(/\d+/),10);
  20.         this.get('node').set('innerHTML', dNum);
  21. ////////////////////////////////////////////////////////////////////////////
  22.  
  23. ////////////////////////////////////////////////////////////////////////////
  24.         var trans = {
  25.         method: "POST",
  26.         data: "ID=dNum&first=yes",
  27.         headers: { 'X-Transaction': 'Post Transfer'}
  28.         };
  29.        
  30.         var sUrl = "index.php?page=deckManager";
  31.  
  32.  
  33.  
  34.         var request = Y.io(sUrl, trans);
  35.  
  36.  
  37.     });
  38.    
  39. ///////////////////////////// End //////////////////////////
  40.      
  41. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top