mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
This reverts commit 5c6925385e.
This commit is contained in:
@@ -16,11 +16,11 @@ Scrollspy has a few requirements to function properly:
|
||||
|
||||
When successfully implemented, your nav or list group will update accordingly, moving the `.active` class from one item to the next based on their associated targets.
|
||||
|
||||
{{% callout %}}
|
||||
{{< callout >}}
|
||||
### Scrollable containers and keyboard access
|
||||
|
||||
If you're making a scrollable container (other than the `<body>`), be sure to have a `height` set and `overflow-y: scroll;` applied to it—alongside a `tabindex="0"` to ensure keyboard access.
|
||||
{{% /callout %}}
|
||||
{{< /callout >}}
|
||||
|
||||
## Example in navbar
|
||||
|
||||
@@ -262,17 +262,17 @@ var scrollSpy = new bootstrap.ScrollSpy(document.body, {
|
||||
})
|
||||
{{< /highlight >}}
|
||||
|
||||
{{% callout danger %}}
|
||||
{{< callout danger >}}
|
||||
#### Resolvable ID targets required
|
||||
|
||||
Navbar links must have resolvable id targets. For example, a `<a href="#home">home</a>` must correspond to something in the DOM like `<div id="home"></div>`.
|
||||
{{% /callout %}}
|
||||
{{< /callout >}}
|
||||
|
||||
{{% callout info %}}
|
||||
{{< callout info >}}
|
||||
#### Non-visible target elements ignored
|
||||
|
||||
Target elements that are not visible will be ignored and their corresponding nav items will never be highlighted.
|
||||
{{% /callout %}}
|
||||
{{< /callout >}}
|
||||
|
||||
### Methods
|
||||
|
||||
|
||||
Reference in New Issue
Block a user