MCPcopy
hub / github.com/mongodb/node-mongodb-native / ScrollSpy

Function ScrollSpy

docs/3.4/lib/bootstrap.js:1604–1621  ·  view source on GitHub ↗
(element, options)

Source from the content-addressed store, hash-verified

1602 // ==========================
1603
1604 function ScrollSpy(element, options) {
1605 var href
1606 var process = $.proxy(this.process, this)
1607
1608 this.$element = $(element).is('body') ? $(window) : $(element)
1609 this.$body = $('body')
1610 this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
1611 this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1612 this.selector = (this.options.target
1613 || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1614 || '') + ' .nav li > a'
1615 this.offsets = $([])
1616 this.targets = $([])
1617 this.activeTarget = null
1618
1619 this.refresh()
1620 this.process()
1621 }
1622
1623 ScrollSpy.DEFAULTS = {
1624 offset: 10

Callers

nothing calls this directly

Calls 4

onMethod · 0.80
$Function · 0.50
isMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected