Home > Article > Web Front-end > jQuery simply implements QQ space likes and cancels likes_jquery
I saw that some netizens created dynamic likes for space friends, adding and canceling like functions. Directly run script
Friend dynamic like code
jQuery("a.qz_like_btn_v3[data-clicklog='like']").each(function(index,item){ console.log(item); jQuery(item).trigger('click'); }); jQuery(window).scroll(function(){ jQuery("a.qz_like_btn_v3[data-clicklog='like']").each(function(index,item){ jQuery(item).trigger('click'); }); return true; });
Cancel Like
jQuery("a.qz_like_btn_v3[data-clicklog='cancellike']").each(function(index,item){ console.log(item); jQuery(item).trigger('click'); }); jQuery(window).scroll(function(){ jQuery("a.qz_like_btn_v3[data-clicklog='cancellike']").each(function(index,item){ jQuery(item).trigger('click'); }); return true; });
The above is the entire content of this article, I hope you all like it.