MCPcopy Create free account
hub / github.com/TruthHun/BookStack / ScrollSpy

Function ScrollSpy

static/bootstrap/js/bootstrap.js:1902–1915  ·  view source on GitHub ↗
(element, options)

Source from the content-addressed store, hash-verified

1900 // ==========================
1901
1902 function ScrollSpy(element, options) {
1903 this.$body = $(document.body)
1904 this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1905 this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1906 this.selector = (this.options.target || '') + ' .nav li > a'
1907 this.offsets = []
1908 this.targets = []
1909 this.activeTarget = null
1910 this.scrollHeight = 0
1911
1912 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1913 this.refresh()
1914 this.process()
1915 }
1916
1917 ScrollSpy.VERSION = '3.3.7'
1918

Callers

nothing calls this directly

Calls 2

extendMethod · 0.80
$Function · 0.50

Tested by

no test coverage detected