天天看點

jq實作點選顯示,其它同class元素隐藏的效果

折騰了好久  終于找到個哥們寫得不錯了  收藏之後我老是找不到收藏在哪  隻好轉載一份

<!DOCTYPE html>
<html >
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        body {
            margin: 100px;
        }
        
        .one {
            width: 200px;
            margin-bottom: 5px;
        }
        
        .one a {
            background: red;
            text-decoration: none;
            display: block;
            text-align: center
        }
        
        .one p {
            display: none;
            background: green;
        }
    </style>
    <script src="j
           
jq