try catch block for jquery loading