make compatible with jQuery version less then 1.11.x