码迷,mamicode.com
首页 > Web开发 > 详细

【jQuery】总结:筛选器、控制隐藏、操作元素style属性

时间:2015-09-15 12:30:23      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

  • 筛选器

  -> http://blog.csdn.net/lijinwei112/article/details/6938134

  常用到的:

$("tr[id=ac_"+id+"]").show();
<!-- 1.-->
$(":checkbox[name=select_" + id + "_checkbox][checkbox=true]").each(function(){

});
<!-- 2.-->
var ac;
$(‘input[id*=‘+ac+‘]‘).each(function(){

})
  • 控制标签的显隐  

  .bind();   -> http://www.w3school.com.cn/jquery/event_bind.asp

  .show();

  .hide();   -> http://www.w3school.com.cn/jquery/effect_show.asp

//折叠菜单
    $(function() {
        $(‘.href_span‘).bind( ‘click‘,
            function() {
                var id = $(this).attr("id");
                if($(this).html() == "+"){
                    $("tr[id=ac_"+id+"]").show();
                    $(this).html("-");
                }else{
                    $("tr[id=ac_"+id+"]").hide();
                    $(this).html("+");
                }
            }
        );
    });
  • 操作元素style属性

  -> http://www.nowamagic.net/librarys/posts/jquery/27

1 $(".state_4").css("color","#F75000");//

 

  

    

【jQuery】总结:筛选器、控制隐藏、操作元素style属性

标签:

原文地址:http://www.cnblogs.com/zhengbin/p/4809604.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!