works only with jquery < 1.9