solve jQuery compatibility problem