jquery选择器

// 选取了test的父节点的父节点 类名是.control-group 移除了error
$('#test').parent().parent('.control-group').removeClass('error');

// 选取了test的相邻节点.help-inline
$('#u_phone1').siblings('.help-inline').removeClass('icon-ok');

  

posted @ 2014-09-01 16:46  page wang  阅读(118)  评论(0)    收藏  举报