javascript - jquery droppable loses its original class -


I need to get element ID and class when something is dropped on it id works fine, but the orbit Not passed ...

HTML

  & lt; Div id = "drag" class = "two" & gt; Drag & lt; / Div & gt; & Lt; Div id = "drop" square = "one" & gt; Drop & lt; / Div & gt;   

js

  $ (document) .ready (function () {$ ("# drag"). Draggable (); $ ("# drop "). Dropable ({drop: function () {warning (this.class +" "+ this.id)}});   

"post-text" itemprop = "text">

As stated, when the draggable has been removed, then this square was retrieved, but 2 To use the data - * attribute that is started in HTML 5

  $ (document) .ready (function () {$ ("# Drag "). Draggable ({revert: true}} $ (" # drop "). Droppable ({drop: }}}} {Alert ($ (this) .attr ('class') + "" + $ (this) .attr ('id'))}}}}    < / html>

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -