<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-98841-11']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>ThreeDubMedia · jquery.event.drop</title>
</head>
<body>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-98841-11']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<div class="item">PROVA</div>
<div class="container">CONTAINER</div>
</body>
</html>
<script>
jQuery(function($){
$('.item').drag("start",function( ev, dd ) {
console.log("Start Drag");
})
.drag("end",function( ev, dd ){
console.log("End drag");
})
.drag(function( ev, dd ){
console.log("drag");
})
});
$('.container')
.drop("start",function(){
console.log("Drop Start");
})
.drop(function( ev, dd ){
console.log("Drop");
})
.drop("end",function(){
console.log("Drop End");
})
</script>
<style>
.container {
position: absolute;
width: 100px;
height: 100px;
background-color: blue;
top: 200px;
}
</style>
My project is more complex and not work but this simple example has the same result. Not print the messages into drop events.
Thanks all