title: can javascript object method be an action?
body: <p>Am a little confused about the javascript object,say I have the DOM below</p>
  
  <pre><code>&lt;div class='of'&gt;&lt;/div&gt;
  &lt;div class='of'&gt;&lt;/div&gt;
  &lt;div class='of'&gt;&lt;/div&gt;
  &lt;div class='of'&gt;&lt;/div&gt;
  
   //select all of them 
    var fof = $('.of')
  </code></pre>
  
  <p>So fof is an array with 4 DOM object right? Can I treat the fof as javascript object ,and define some method like:</p>
  
  <pre><code>fof = {
    open:function(){
  
     }
   }
  </code></pre>
  
  <p>And is it possible to define some 'action' for fof; like click dblclick, so when the 'action' happens (like a event handler),call some method! in steady of hard coding </p>
  
  <pre><code>fof.click(function(){
  
  })
  </code></pre>
  
  <p>How can I do that?</p>