trying to bind jquery(document).click event

casalove

New Member
I am trying to bind $(document).click event in asp.net ajax BeginrequestHandler and EndRequestHandler event when the Request is sent the unbind should be called so that the click event does not work. When the endRequestHandler is called then the bind should be executed again. \[code\] function BeginRequestHandler(sender, args) { $(document).unbind("click"); $("#divUtility > :first-child").css ({'position':'absolute', 'left':'0px', 'right':'0px', 'width':'250px', 'height':'70px', 'ba ckground-color':'#EfEfEF'}); } function EndRequestHandler(sender, args) { $(document).bind("click",function(e){ if($(e.target).hasClass("UtilityClass")) { }else{ $('.popupstyle').hide();} });\[/code\]}The rest is working fine.However, the unbind is not working.
 
Back
Top