added scrollParentFn without jquer or jquery ui dependence