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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -