jquery常用指令

table中td多行展示:

```css
td {
   word-wrap: break-word;
}
```

div模态框:

 <div id="loading" style="display: none;">
        <div id="loading2">
        </div>
        <img id="loading2img" src="" alt="">
 </div> 
 
   <%--加载模态框样式--%>
        #loading {
            display: none;
            position: fixed;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            z-index: 1010;
            -moz-opacity: 0.8;
            opacity: .80;
            filter: alpha(opacity=80);
            background: rgba(255, 255, 0, 0.4);
        }

        #loading2 {
            position: absolute; /*绝对定位*/
            top: 50%; /* 距顶部50%*/
            left: 50%; /* 距左边50%*/
            height: 200px;
            margin-top: -100px; /*margin-top为height一半的负值*/
            width: 200px;
            margin-left: -100px; /*margin-left为width一半的负值*/
            background: rgba(255, 255, 0, 0.4);

            z-index: 1011;
            overflow: hidden;
        }

        #loading2img {
            position: absolute; /*绝对定位*/
            top: 50%; /* 距顶部50%*/
            left: 50%; /* 距左边50%*/
            height: 200px;
            margin-top: -100px; /*margin-top为height一半的负值*/
            width: 200px;
            margin-left: -100px; /*margin-left为width一半的负值*/
            z-index: 1;
        }
 
    //$("#loading").css("display", "block"); 显示 
    //$("#loading").hide() 隐藏
    
    
     

###绑定点击事件
$(".xxx").bind('click', function () {}

寻找节点

孩子 .children() 第一个孩子:.children(":first") 最后一个.children(":last")
兄弟 .next()

标签内容:

.text()
包含xx .indexOf("xx")
获取属性 .attr("xx") 设置属性:.attr({"class": "disabled"})
获取html .html()
移除class .removeClass("disabled")

转载于:https://www.cnblogs.com/fly-book/p/10540610.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值