jquery function call
I bound the blur function to 开发者_开发技巧a text box having class name 'qtyToPick'. Now I want to call the same blur function if I change checked property of a check box having class 'chkSelect'.
How can i do it ?
$('.qtyToPick').live('blur', function() {
    //  Code here
});
Define the function separately, and bind it to the appropriate events for the appropriate elements:
var theFunc = function() { /* Code here */ };
$( '.qtyToPick' ).live( 'blur', theFunc );
$( '.chkSelect' ).live( 'change', theFunc );
$('#chkSelect').change(function() {
   $('.qtyToPick').blur();
});
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论