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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -