Compatible with jQuery 1.7+ by removing old method