compatibility with some old jQuery versions