0

im new to jQuery. I'm trying to use this script.

  __cnt__=0;
jQuery('.grid-cell .not-following .follow-text').each(function (i, ele) { 
    ele = jQuery(ele); 
    var ai = 0;
    setTimeout(function () {
      ele.click();
        return;
    }, __cnt__++*2000); 
  });

But this doesnt work and return this on chrome console:

e.fn.init [prevObject: e.fn.init(1)]

Original script is this and works fine:

  __cnt__=0; jQuery('.Grid-cell .not-following .follow-text').each(function (i, ele) { 
ele = jQuery(ele); 
if (ele.css('display')!='block') {
console.log('already following:', i); return;} 
setTimeout(function () {ele.click();}, __cnt__++*2000); });

You can run above scripts on follower or following screens on twitter. i really dont understand why mine dosnt work. please let me ask for your help. Thanks.

Hill
  • 155
  • 1
  • 4
  • 9
  • I don't use twitter. It would be helpful to include sample HTML for which your script would need to work. Twitter may not stick to the same HTML/classes in the future. – trincot Jan 20 '19 at 13:07
  • In the first example, you are using `.grid-cell` and in the second `.Grid-cell` – Pablo Jan 20 '19 at 13:08

0 Answers0