fixed jQuery function check