What is the difference between scrollTop() method and scrollTop property in jQuery? -
i bit confused try understand difference between jquery method scrolltop() , property scrolltop. read jquery method scrolltop() @ several places on internet surprisingly didn't read anywhere scrolltop jquery property. not sure though saw in many code of animate() method, people using scrolltop: value scroll page. please let me understand this. there resource on internet can tell scrolltop can used property.
jquery's .scrolltop()
method wraps native element.scrolltop
property.
that is, .scrolltop()
method belongs jquery objects while property belongs native elements. 2 won't present in same object.
i saw in many code of animate() method, people using scrolltop: value scroll page
yes, scrolltop
animatable property. see .animate()
docs:
in addition style properties, non-style properties such
scrolltop
,scrollleft
, custom properties, can animated.
is there resource on internet can tell scrolltop can used property.
the jquery api documentation , mdn places information.
Comments
Post a Comment