title: Difference in output while executing the same code from console and via contentscript
body: <p>I am trying to trigger a click artificially via content script. While the same code works and triggers the click when tried from console, it doesn't when tried from contentscript.</p>
  
  <p>If I try to echo the selected element on which I am applying the click , I got this :-</p>
  
  <p>Via Console </p>
  
  <pre><code>[&lt;a class=​"blue apply-coupon"&gt;​APPLY COUPON​&lt;/a&gt;​]
  </code></pre>
  
  <p>SO, the link is properly selected here</p>
  
  <p>Via Contentscript , I got the link as some object like this</p>
  
  <pre><code>[a.blue.apply-coupon, prevObject: e.fn.e.init[1], context: document, selector: ".coupon-section a", constructor: function, init: function…] 
  </code></pre>
  
  <p>I tried to trigger the click by both .click() and by making a click even and triggering :-</p>
  
  <pre><code>1. $('.coupon-section').find('a').click();
  
  2. var e = jQuery.Event( "click" );
  jQuery('.coupon-section a').trigger(e);
  </code></pre>
  
  <p>None of them working. Can anyone suggest what wrong am I doing and is there any way to trigger when the link is available as an object as it is available in case of contentscripts.</p>
  
  <p>Update : On expanding the link object, I get this. I am adding the object only upto click.</p>
  
  <pre><code>0: a.blue.apply-coupon
  context: document
  length: 1
  prevObject: e.fn.e.init[1]
  0: div.coupon-section
  context: document
  length: 1
  prevObject: e.fn.e.init[1]
  selector: ".coupon-section"
  __proto__: Object[0]
  _toggle: function (a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d&lt;b.length)b[d++].guid=c;return this.click(e)}
  add: function (a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&amp;&amp;a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))}
  addClass: function (a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&amp;&amp;typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c&lt;d;c++){e=this[c];if(e.nodeType===1)if(!e.className&amp;&amp;b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h&lt;i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this}
  after: function (){if(this[0]&amp;&amp;this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}}
  ajaxComplete: function (a){return this.on(b,a)}
  ajaxError: function (a){return this.on(b,a)}
  ajaxSend: function (a){return this.on(b,a)}
  ajaxStart: function (a){return this.on(b,a)}
  ajaxStop: function (a){return this.on(b,a)}
  ajaxSuccess: function (a){return this.on(b,a)}
  andSelf: function (){return this.add(this.prevObject)}
  animate: function (a,b,c,d){function g(){e.queue===!1&amp;&amp;f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&amp;&amp;f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&amp;&amp;(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&amp;&amp;b.specialEasing[g]||b.easing||"swing";if(h==="hide"&amp;&amp;d||h==="show"&amp;&amp;!d)return b.complete.call(this);c&amp;&amp;(g==="height"||g==="width")&amp;&amp;(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&amp;&amp;f.css(this,"float")==="none"&amp;&amp;(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&amp;&amp;(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&amp;&amp;(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&amp;&amp;(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)}
  append: function (){return this.domManip(arguments,!0,function(a){this.nodeType===1&amp;&amp;this.appendChild(a)})}
  appendTo: function (c){var d=[],e=f(c),g=this.length===1&amp;&amp;this[0].parentNode;if(g&amp;&amp;g.nodeType===11&amp;&amp;g.childNodes.length===1&amp;&amp;e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h&lt;i;h++){var j=(h&gt;0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}
  attr: function (a,b){return f.access(this,a,b,!0,f.attr)}
  before: function (){if(this[0]&amp;&amp;this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}}
  bind: function (a,b,c){return this.on(a,null,b,c)}
  blur: function (a,c){c==null&amp;&amp;(c=a,a=null);return arguments.length&gt;0?this.on(b,null,a,c):this.trigger(b)}
  change: function (a,c){c==null&amp;&amp;(c=a,a=null);return arguments.length&gt;0?this.on(b,null,a,c):this.trigger(b)}
  children: function (c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&amp;&amp;typeof d=="string"&amp;&amp;(e=f.filter(d,e)),e=this.length&gt;1&amp;&amp;!R[a]?f.unique(e):e,(this.length&gt;1||N.test(d))&amp;&amp;M.test(a)&amp;&amp;(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}
  clearQueue: function (a){return this.queue(a||"fx",[])}
  click: function (a,c){c==null&amp;&amp;(c=a,a=null);return arguments.length&gt;0?this.on(b,null,a,c):this.trigger(b)}
  </code></pre>
  
  <p>Please comment if I am unclear in asking my question.</p>
  
  <p>Thanks !</p>