Error in doing drag and drop
<p>My code is`</p>

<pre><code>&lt;script&gt;
 $(function(){
 var xco,yco,sen,ple,pto;
document.onmouseup=function(){document.onmousemove=null;};
$(".pcre").mousedown(function(e){sen=$(this);
ple=sen.offset().left; 
 pto=sen.offset().top; 
  xco=e.clientX;
  yco=e.clientY;

  $(document).mousemove(function(e){fle=ple+e.clientX-xco;
  fto=pto+e.clientY-yco;
  sen.css("top",fto);
  sen.css("left",fle);

  });
  });


 });&lt;/script&gt;
</code></pre>

<p>`When I move the div it moves but on mouseup nothing happens and it keeps on following mouse</p>
