This is a migrated thread and some comments may be shown as answers.

jQuery click event not firing after RadAjaxLoadingPanel returns

1 Answer 49 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
IanIan
Top achievements
Rank 1
IanIan asked on 25 Nov 2011, 02:09 PM
Hi there,

I'm handling the client side event 'OnClientHiding'. The event is raised and my code is called. In my code some click events are assigned to some check boxes using jQuery. Unfortunately the click event handlers don't run when I click on the check boxes.

The jQuery code works perfectly when the page first loads. Its when I try and re-initialize the check boxes after a call back that it doesn't run properly.

Do you have any idea how to fix this?

Here is some code...

$(document).ready(function () {  
    f
(); 
}); 
 
 
function LoadingPanelHiding(sender, eventArgs) { 
     f
(); 
 
} 
 
 
function f() { 
         $
('.selectAll').click(function () { 
             alert
('Hello world!'); 
        
}); 
 
} 

Cheers, Ian.

1 Answer, 1 is accepted

Sort by
0
Trustteam
Top achievements
Rank 2
answered on 08 May 2013, 09:11 AM
replace

$(document).ready(function ()

with

Sys.Application.add_load(function ()

as found here: http://stackoverflow.com/questions/8270215/jquery-not-working-after-call-back-with-radajaxloadingpanel

works for me. had same problem.
Tags
Ajax
Asked by
IanIan
Top achievements
Rank 1
Answers by
Trustteam
Top achievements
Rank 2
Share this question
or