Home > Web Front-end > JS Tutorial > jQuery simply implements QQ space likes and cancels likes_jquery

jQuery simply implements QQ space likes and cancels likes_jquery

WBOY
Release: 2016-05-16 16:05:56
Original
1447 people have browsed it

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;
});

Copy after login

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;
});

Copy after login

The above is the entire content of this article, I hope you all like it.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template