Jquery blur + enter on jquery dialog -
my blur event doesn't work using code enter event works fine.
$(document).on('blur keyup', "#classsection",function(event) { // stuff here var section = $(this).val(); var controll = $(this).attr("controll"); if(section != ""){ switch(controll){ case 'enrollment': if(event.keycode == '13') { var idno = $("#idno").val(); sectioninfo(section); enrollmentsubjects(idno,section); } break; case 'classes': if(event.type == 'blur' || event.keycode == '13') { sectionsubjects(section); } break; case 'copyclass': if(event.type == 'blur' || event.keycode == '13') { alert(controll); } break; }//end of switch }else{ $("#yearlevel").val(""); }});
if use 1 below work on page not in modal dialog
$("#classsection").on('blur keyup',function(event)
but 1 above enter work not blur
Comments
Post a Comment