jquery 移除border_jquery怎么移除off方法?

varindex;

$(document).ready(function(){

test();//触发

functiontest(){

$("#setpage span").each(function(i,n){

$(this).click(function() {

temp=$("#spadd").remove();varnewtemp=$('点击加载');

$("#content").html("");

newtemp.appendTo($("#content"));varnum=$(this).text();//这里是每页是50条

//alert(num);

index=(parseInt(num,10)-1)*50 +5;

$("#hxt").val(index);

$("#big").val(num);

$(this).addClass("current").siblings().removeClass("current");

});

});

}

$('#content').on('click','span',function() {//alert("dd");

//每页是5条

index=$("#hxt").val();

div=$("

第"+index+"页
")

$("#content").append(div);varbignum=$("#big").val();varnum=(parseInt(bignum,10))*5*10;if(index>=num){//$('#content').off('click','span');//怎么移除off

$("#spadd").remove();return;

}else{

$("#spadd").appendTo($("#content"));

}varx=parseInt(index,10)+ 5;

$("#hxt").val(x);

});

});

#content{width:100%;height:auto;}.yema{width:80%;height:100px;}#setpage{margin:15px auto;text-align:center;

}#setpage span{border:1px solid #DDD;background:#0d6cbf;display:inline-block;margin:1px;text-decoration:none;text-align:center;color:#fff;padding:5px 10px;font-size:16px;border-radius:5px;

}#setpage .current{border:1px solid #0d6cbf;background:#fff;margin:1px;color:#000;text-decoration:underline;

}


当前页:

点击加载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值