title: How to pass parameter to jQuery . animate option object complete property?
body: <p>Question title is confusing, I know. it also make my search hard to find a solution.</p>
  
  <p>assume I have these codes, how can I pass parameter to <code>complete</code> or <code>step</code> when .animate() option is an external object?</p>
  
  <pre><code>var someObj = {
      onComplete: function(e) {
          console.log(e); // return undefined
      },
  
      onStep: function(e) {
          console.log(e); // return undefined too
      },
  }
  
  var optionObj = {
      duration: 300,
      easing: 'linear',
      complete: someObj.onComplete(e), // this is not working
      step: someObj.onStep(e) // this is not working
  }
  
  $('div').animate({width: "500px", height: "500px"}, optionObj);
  </code></pre>