title: create instance of object inside jquery click function
body: <p>Hi I've just playing with some <code>oojs</code>, I've tried to complete a what is a very simple test.</p>
  
  <p>check out the code here :
  <a href="http://jsbin.com/petegefoluve/2/edit?html,js,output" rel="nofollow noreferrer">view the test jsbin</a></p>
  
  <p>I noticed I couldn't create a new instance of an object inside a function, without moving it outside the function or by pre-pending it with window eg</p>
  
  <blockquote>
    <p>window.person = new person();</p>
  </blockquote>
  
  <p>I've a feeling this is wrong.</p>
  
  <p>so my question is , is their a better way to do this,
  and is using  <code>window.person</code> a bad idea to create a new instance.</p>