title: How to detect if JS origin is unaccessible?
body: <p>My website loads some JS file from third-party server. In some cases this server is unaccessible. Is it possible to detect such situation (for example if timeout > 200ms or 4XX response), and load JS file from another server?
  Maybe jQuery can help we with it?</p>
  
  <p>P.S. I can't host this JS file on own server, as it is generated dynamically. </p>