MCPcopy Create free account
hub / github.com/kenberkeley/react-demo / ScrollSpy

Function ScrollSpy

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

Source from the content-addressed store, hash-verified

1886 // ==========================
1887
1888 function ScrollSpy(element, options) {
1889 this.$body = $(document.body)
1890 this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1891 this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1892 this.selector = (this.options.target || '') + ' .nav li > a'
1893 this.offsets = []
1894 this.targets = []
1895 this.activeTarget = null
1896 this.scrollHeight = 0
1897
1898 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1899 this.refresh()
1900 this.process()
1901 }
1902
1903 ScrollSpy.VERSION = '3.3.5'
1904

Callers

nothing calls this directly

Calls 1

$Function · 0.85

Tested by

no test coverage detected