揰掵佲 发表于 2018-12-25 14:24:19

emlog[黑科技]访客自动点赞[js]

首先,找到当前使用模版的目录,我选择在footer.php添加代码任意位置 script标签var that = $(this);
            setTimeout(function(){
                                    var mark = that.index(), /* action = '', */ post_ID = infoid;
                        ajax_data = { mark: '0', plugin: 'digg', /* action: action, */ id: infoid };
                        $.post('', ajax_data,function(data){
                                        that.parent().children().eq(0).find('span:last').html( data.split(',') );
                                        that.parent().children().eq(2).find('span:last').html( data.split(',') );
                                        that.find('img').addClass('bounce animated');
                                        that.find('span:first').addClass('flash animated');
                                        if ( that.index() == 0 ) {
                                                that.find('span:last').addClass('bounceInDown animated');
                                                /* that.addClass('niceIn'); */
                                        } else if ( that.index() == 2 ) {
                                                that.find('span:last').addClass('bounceInUp animated');
                                                /* that.addClass('niceIn'); */
                                        }
                                        $('.z_digg').children().eq(0).find('span:first').text('已赞过');
                                        $('.z_digg').children().eq(2).find('span:first').text('不能踩');      
                })
            },1500)



页: [1]
查看完整版本: emlog[黑科技]访客自动点赞[js]