$(document).ready not executing sometimes after a postback

$(document).ready not executing sometimes after a postback

$(document).ready() isn’t called after a  postback is made. This happens thrice in 5 attempts or more.

I have the below code in the $(document).ready() which needs to be executed on every postback which is not executed sometimes.

 

$(document).ready(function ()  {

    Sys.StringBuilder.prototype.appendFormat = function (mask) { this.append(String.format.apply(null, arguments)); };

});

 

As a result i get the below error

Object has no method 'appendFormat'

 

Does anyone know why this is happening .... if yes plz do lemme know...

Thank you !!!