title: jQuery plugin and prototype class
body: <p>Hi I am converting some prototype javascript to jQuery javascript.</p>
  
  <p>In prototype we can do Class.create to create a class. However, jQuery doesn't provide this. So I was thinking to rewrite the class into a jQuery plugin. Is this the best practice? My concern is that if I do all for the class, then I will add a lot of things to jQuery object.</p>
  
  <p>The other alternative is to use some extra lines of codes I found <a href="http://ejohn.org/blog/simple-javascript-inheritance/#postcomment" rel="nofollow noreferrer">http://ejohn.org/blog/simple-javascript-inheritance/#postcomment</a>. Then you can do the following:</p>
  
  <pre><code>var Person = Class.extend({
    init: function(isDancing){
      this.dancing = isDancing;
    },
    dance: function(){
      return this.dancing;
    }
  });
  </code></pre>
  
  <p>Or else, i found this jQuery plugin called HJS that allows you to create Class as well.<a href="http://plugins.jquery.com/project/HJS" rel="nofollow noreferrer">http://plugins.jquery.com/project/HJS</a></p>
  
  <p>However, I am not use is it necessary to use these plugins to allow me to use Class or I can just convert the class into the way to write a jQuery plugin, please advise. Thank you very much!</p>