What attribute needs to be set in the HTML to target the element ScrollSpy is applied to?

  • data-spy
  • data-target
  • data-scroll
  • data-offset
The attribute that needs to be set in the HTML to target the element ScrollSpy is applied to is data-target. This attribute specifies the target element or navigation bar that ScrollSpy should update based on the scroll position.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *