title: How to simulate click event on DIV element with JS/jQuery
body: <p><a href="http://services.groupes.be/ibrunet/ibrunet.aspx?lg=NL" rel="nofollow">http://services.groupes.be/ibrunet/ibrunet.aspx?lg=NL</a></p>
  
  <p>I am trying to simulate click events on DIV elements with <code>class="x-grid-cell-inner"</code>(with text Ibrunet, Signaletiek..)</p>
  
  <p>First I inserted jQuery.</p>
  
  <pre><code>javascript:var s=document.createElement('script');s.setAttribute('src', 'http://code.jquery.com/jquery.js');document.getElementsByTagName('body')[0].appendChild(s);alert("loaded");void(s);
  </code></pre>
  
  <p>Then I tried this</p>
  
  <pre><code>var bedragenDivClass = "x-grid-cell-inner ";
  var bedragenDivText = "Bedragen";
  var divs = document.getElementsByClassName(bedragenDivClass);
  for (var i = 0, len = divs.length; i &lt; len; i++) {
      if(divs[i].innerText.localeCompare(bedragenDivText) == 0){
          alert("found");
      };
  };
  </code></pre>
  
  <p>And I've got referrence to this DIV but then I tried several different functions to trigger click event without any success</p>
  
  <pre><code>.trigger()
  
  .triggerHandler()
  
  .click()
  </code></pre>
  
  <p>When I open Chrome Dev Tools I can see several handler bounded to that DIV but I dont know how to trigger them</p>
  
  <p>Unusual thing is that I could simulate click on input elements on right panel</p>
  
  <pre><code>var contractTypeInputId = "Cmb_Type_Contrat_Ibrunet_PLus-inputEl";
  var contractTypeInput = document.getElementById(contractTypeInputId);
  contractTypeInput.click();
  </code></pre>
  
  <p>Also I could click on elemenets of that input that show after script click it.</p>
  
  <p>Since those DIV's don't have id attribute and I thought I need id to trigger the event I've gave them inside Dev Tools and I could retrieve it after but again no success with triggering onClick event.</p>
  
  <p>The strangest thing is when I run something like this:</p>
  
  <pre><code>$("div").click();
  </code></pre>
  
  <p>I can see many DIV's beign clicked but those with that class I specified are not affected.</p>
  
  <p>If I can trigger the event as simple as clicking on that DIV why I failed simulating it?</p>