jQuery制作拼图小游戏

2020-05-24 21:18:48易采站长站整理

                            $(this).removeClass(“on”);
                            $(this).find(‘span’).remove();
                            $(this).css({‘z-index’:’0′});
                            if(_that.isPass($div) == _that.nLen){
                                if(typeof _that.opt.success == ‘function’){
                                    _that.opt.success({target:_that.target});
                                }
                            }
                    });
                }
                else {
                    if($this.hasClass(“on”)){
                        $this.removeClass(“on”);
                        $this.find(‘span’).remove();
                    }
                    else {
                        $this.addClass(“on”).append(“<span></span>”);
                    }