title: replace mousemove by mousedrag?
body: <p>The title explains it all.I am facing problem when it comes to providing drag event. I tried replacing <code>mousemove</code> by <code>mousedown</code>, may be <code>mousedown</code> fires once and settles down, but it dint help. How can I programmatically do this.</p>
  <p>In case you want to refer what code I am trying to manipulate you can refer this code; else ignore it:</p>
  <pre><code>&lt;script&gt;
  $(document).ready(function () {
  
      $(&quot;.toolImage&quot;).mouseover(function () {
          $(this).parent(&quot;.toolTip&quot;).find(&quot;.toolTipDesc&quot;).css(&quot;display&quot;, &quot;block&quot;);
      });
      $(&quot;.toolImage&quot;).mouseleave(function () {
          $(this).parent(&quot;.toolTip&quot;).find(&quot;.toolTipDesc&quot;).css(&quot;display&quot;, &quot;none&quot;);
      });
      var native_width = 0;
      var native_height = 0;
  
      //Now the mousemove function
      $(&quot;.magnify&quot;).mousemove(function (e) {
  
          if (!native_width &amp;&amp; !native_height) {
              //This will create a new image object with the same image as that in .small
              //We cannot directly get the dimensions from .small because of the
              //width specified to 200px in the html. To get the actual dimensions we have
              //created this image object.
              var image_object = new Image();
              image_object.src = $(&quot;.small&quot;).attr(&quot;src&quot;);
  
              native_width = image_object.width;
              native_height = image_object.height;
          } else {
  
              var magnify_offset = $(this).offset();
              var mx = e.pageX - magnify_offset.left;
              var my = e.pageY - magnify_offset.top;
  
              //Finally the code to fade out the glass if the mouse is outside the container
              if (mx &lt; $(this).width() &amp;&amp; my &lt; $(this).height() &amp;&amp; mx &gt; 0 &amp;&amp; my &gt; 0) {
                  $(&quot;.large&quot;).fadeIn(100);
              } else {
                  $(&quot;.large&quot;).fadeOut(100);
              }
              if ($(&quot;.large&quot;).is(&quot;:visible&quot;)) {
                  var rx = Math.round(mx / $(&quot;.small&quot;).width() * native_width - $(&quot;.large&quot;).width() / 2) * -1;
                  var ry = Math.round(my / $(&quot;.small&quot;).height() * native_height - $(&quot;.large&quot;).height() / 2) * -1;
                  var bgp = rx + &quot;px &quot; + ry + &quot;px&quot;;
  
                  //Time to move the magnifying glass with the mouse
                  var px = (mx - $(&quot;.large&quot;).width() / 2);
                  var py = (my - $(&quot;.large&quot;).height() / 2);
  
                  $(&quot;.large&quot;).css({
                      left: px,
                      top: py + 10,
                      backgroundPosition: bgp
                  });
              }
          }
      })
  
      $('.t1').mouseenter(function () {
  
          $('.pointerTxt').fadeIn();
      });
  
      $('.t1').mouseleave(function () {
  
          $('.pointerTxt').fadeOut();
      });
  
  });
  &lt;/script&gt;
  </code></pre>