jQuery Tutorial Tutorials - jQuery .offsetParent() method

jQuery .offsetParent() method

The .offsetParent() method in jQuery is used to get the closest ancestor element that is positioned.

jQuery .offsetParent() method Syntax

.offsetParent()

jQuery .offsetParent() method Example

Find the offsetParent of paragraph and highlight it.
Don't forget to set the element position attribute to absolute, relative or fixed.

Try now

Date:2019-08-20 16:04:53 From:www.Lautturi.com author:Lautturi