How to chain jquery plugin option with regular jquery methods? <p>I am making a plugin called myPlugin (it is an object) and options object added to it as a property (hopefully I got that right) this way:</p> <pre><code>$.fn.myPlugin.options = {type: 'slideToggle'} </code></pre> <p>Now, inside a method within the myPlugin object, how would I change:</p> <pre><code>$(this).next().slideToggle(200); </code></pre> <p>so it gets the slideToggle from options, so it is not hardcoded ?</p> <p>Something like:</p> <pre><code>$(this).next().myPlugin.options.type(200); </code></pre>