Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have loaded a user control in a page dynamically using jquery.
In user control I am using document.ready event to some operation,but this ready event is firing twice when the user control is loaded into the main page.
Can anybody help me with this problem?

Thanks in Advance...
Posted
Comments
vbmike 29-May-13 9:43am    
You need to show folks where you are calling the ready function in your code for the page, without knowing what is broke it is hard to fix.

1 solution

Found the problem in code.
I was calling the load method of $("#someID") and in success callback of load method I loaded the usercontrol HTML output to $("someID") using $("someID").html,hence the content was loaded in that element twice which lead to jquery event firing twice.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900