jquery点击选中,再次点击取消选中

if(!$(this).hasClass("current")){
   $(this).addClass("current");
 }else{
    $(this).removeClass("current");
 }

 

posted @ 2016-10-27 11:21  公主的咖啡屋  阅读(5676)  评论(0编辑  收藏  举报