title: ExtJs HTML Component Click Event
body: <p>I have built a custom HTML component in extJS by specifying the html value of a panel. I am unable to attach the event handlers to the element (or they are somehow not firing). However, I am able to do other things on the component like hide, append etc. </p>
  
  <pre><code>Ext.select('#toFieldDiv').on('click',function() {
      alert("something");
  });  //Doesn't Work
  
  Ext.select('#toFieldDiv').hide('slow');  //Works
  </code></pre>
  
  <p>Any idea? </p>
  
  <p>Here is my component definition: </p>
  
  <pre><code>{
      xtype: 'panel',
      x: 70,
      y: 0,
      html: "&lt;div id=\"toFieldDiv\" class=\"to-field\"&gt; &lt;/div&gt;"
  }
  </code></pre>
  
  <p>I have even tried the same with jQuery. Again the hide works, but not the click.</p>