<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>点击添加边框,再点击去掉边框</title>
<style>
ul li{
float:left;
list-style:none;
width:50px;
height:30px;
border:1px solid #E3E3E3;
line-height:30px;
text-align:center;
margin-left:10px;
cursor:pointer;
}
.yy{
border:1px solid red;
}
</style>
</head>
<script src="superslide/js/jquery1.42.min.js"></script>
<script>
$(document).ready(function(e) {
$("ul li").click(function(){
$(this).toggleClass('yy');
});
});
</script>
<body>
<div>
<ul>
<li>洗护</li>
<li>洗护</li>
<li>洗护</li>
<li>洗护</li>
<li>洗护</li>
<li>洗护</li>
<li>洗护</li>
<li>洗护</li>
</ul>
</div>
</body>
</html>