Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

Exception handling for document ready in jQuery

Errors in their jQuery $(document).ready function breaks page or prevent executing important code, You can avoid this with simple try..catch approach

Code example

$(document).ready(function () {
try {
  //your all JavaScript/jQuery code
} catch (error) {
    // handle error
    //Default code when error/or exception this will execute

Invalid entry,please enter valid data.