Updated for loader while doing ajax call