ajax work from class