title: How to create a jQuery function (a new jQuery method or plugin)?
body: <p>I know that in JavaScript the syntax is as follows:</p>
  
  <pre><code>function myfunction(param){
    //some code
  }
  </code></pre>
  
  <p>Is there a way to declare a function in jQuery that can be added to an element? For example:</p>
  
  <pre><code>$('#my_div').myfunction()
  </code></pre>