title: How to pass parameter to a jQuery plugin
body: <p>I have a question which at the first glance might seem to be stupid. I got problem figuring it out and whenever I use it, nothing really happens. I have a plugin in jQuery written by myself which is like this:</p>
  
  <pre><code>(function(){
  $.fn.myPlugin = function(options){
  var options = $.extend({
  firstParameter : null;
  }
  // the rest of the plugin
  })(jQuery)
  </code></pre>
  
  <p>But when I call it from an HTML file, like this: <code>("#object").myPlugin(2);</code>, it fails to work (note the parameter that I have passed). But if I skip the argument and call it like this: <code>("#object").myPlugin();</code>, it all works. What is the problem?</p>
  
  <p>Thanks in advance</p>