fixing according to jQuery version