fix preview with recent jquery versions 2.1.1