用jQuery给Checkbox默认加上父子节点操作

2014-11-23 22:03:21 · 作者: · 浏览: 91

  jQuery.noConflict();//与JSF搭配需要这句话,不然会有冲突


  jQuery(document).ready(function() {


  // Add click event listener to each checkbox in the tree page


  // Note! Using this simple selector assumes that there are no other


  // checkboxes on the page, if there are other checkboxes then


  // selector should be changed


  jQuery(":checkbox").click(function(){


  updateChildren(this);


  updateParent(this);


  });


  });