title: how to add dragend event on svg element
body: <p>I am using D3.js to drag SVG elements, using concept of <a href="https://github.com/mbostock/d3/wiki/Drag-Behavior#wiki-on" rel="nofollow">D3.js drag</a>. drag is working fine but I want to call a function on dragend. How to do that? </p>
  
  <p>Here is <a href="http://jsfiddle.net/sb2BX/20/" rel="nofollow">jsFiddle Link</a>. I simply want to call a function on dragend. </p>
  
  <p>Should I try </p>
  
  <pre><code>var drop = d3.behavior.drag()
    .on("dragend", function () { alert(); });
  </code></pre>