2 Replies Latest reply on Feb 15, 2013 8:16 AM by TheChenz

    jquery .click() events delayed by 700+ milliseconds when applied to <a> tags (but not other tags)

    TheChenz

      I'm noticing this weird issue...

       

      If I make some code like this:

       

      <a href="" id="tester">CLICK THIS</a>
      

       

      And then apply this JS/Jquery:

       

      $('#tester').click(function (e) { 
      console.log('ding');
      return false;
       });
      

       

      while in the authoring mode I noticed that it takes 700+ milliseconds to return the 'ding' in the console. (outside of CQ it's instant, of course.) 700 milliseconds doesn’t seem like that big of a deal, but it crushes the CPU at that point and any transition you’re trying to use doesn’t display. A transition like $('#myID).slideDown(300) or  $('#myID).fadeIn(400)  won’t display. (they'll just instantly be at the end of their transition.)

       

      This only applies to <a> tags too... if I apply that click function to a <div> or <span> or whatever, it works instantly.