jQuery事件触发定位
<script type="text/javascript">
jQuery(function() {
jQuery.colorbox({transition : 'none', title : "批量修改", overlayClose : false, width:"800px", inline:true, href:"#batchCourseEditDiv"});
jQuery('#batchCourseEditSettingForm input.grid-filter-submit').remove();
jQuery("input[name$='.terms'][name^='planCourse_.']").each(function(){
var terms=jQuery(this).val().replace(/^,/, '').replace(/,$/, '');
jQuery(this).val(terms);
});
jQuery('#batchCourseEditSettingForm input[name=_batch\\.fake\\.terms]').keyup(function() {
var terms = jQuery(this).val();
if(terms) {
jQuery("input[name$='.terms'][name^='planCourse_.']").each(function(){
jQuery(this).val(terms);
});
}
});
jQuery('#batchCourseEditSettingForm input[name=_batch\\.fake\\.compulsory]').click(function() {
var compulsory = jQuery(this).val();
jQuery("input[name$='.compulsory'][name^='planCourse_.']").each(function(){
if(jQuery(this).val() == compulsory){
jQuery(this).attr("checked","checked");
}
});
});
jQuery('#batchCourseEditSettingForm select[name=_batch\\.fake\\.department\\.id]').change(function() {
var departmentId = jQuery(this).val();
jQuery("select[name^='planCourse_.'][name$='.department.id'] option").each(function(){
if(departmentId == jQuery(this).val()){
jQuery(this).attr("selected","selected");
}
});
});
});
</script>