I'm trying to write a simple jQuery function to click on the "following" buttons of Medium. I wrote this but it returns "Uncaught ReferenceError: jQuery is not defined"
__cnt__ = 0;
jQuery('.button-activeState').each(function(i, ele) {
ele = jQuery(ele);
if (ele.css('display') != 'inline') {
//alert('already following:', i);
return;
}
setTimeout(function() {
ele.click();
}, __cnt__++ * 500);
});
What am I doing wrong?