title: jquery ignoring first click
body: <p>I have this function:</p>
  
  <pre><code>   NewShowHideDiv2(iconID, divID, disabled) {
      var x = document.getElementById(divID);
      var y = document.getElementById(iconID);
      $(eval(y)).click(function() {
      console.log(eval(y));
       $(eval(y)).toggleClass( "clicked" );
  
       });
     $(eval(x)).slideToggle("slow", function() {
  
      });
  }
  </code></pre>
  
  <p>All i am trying to get it to do is toggle the "clicked" class on click. However, it ignores the first and second  click, and then applies it on the third and all subsequent odd number clicks. any ideas?</p>