I have a page that contains a user control within an update panel. $(document).ready(function() ) { is called and executes the code correctly when the page firs
$(document).ready(function() ) {
Most of the times, this is happening because of the Updatepanle. Just put postback triggers to the button and it will solve this.