Scrollspy
bs_scrollspy(*args, &block)
bs_scrollspy(*args, &block)Examples
Example 1: Scrollspy with list-group
bs_row class: "m-3" do
bs_col lg: 4 do
bs_list_group id: "list-example", class: "mb-5", actionable_items: true, items: [
{ type: :link, text: "Item 1", path: "#list-item1"},
{ type: :link, text: "Item 2", path: "#list-item2" }
]
end
bs_col lg: 8 do
bs_scrollspy target: "#list-example", offset: 0, height: 200 do
h2 "Item 1", id: "list-item1"
100.times do
paragraph "Text for item 1"
end
h2 "Item 2", id: "list-item2"
100.times do
paragraph "Text for item 2"
end
end
end
endLast updated