MCPcopy Create free account
hub / github.com/apache/cloudstack / ScrollSpy

Function ScrollSpy

tools/ngui/static/bootstrap/js/bootstrap.js:507–519  ·  view source on GitHub ↗
(element, options)

Source from the content-addressed store, hash-verified

505 * ========================== */
506
507 function ScrollSpy(element, options) {
508 var process = $.proxy(this.process, this)
509 , $element = $(element).is('body') ? $(window) : $(element)
510 , href
511 this.options = $.extend({}, $.fn.scrollspy.defaults, options)
512 this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
513 this.selector = (this.options.target
514 || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
515 || '') + ' .nav li > a'
516 this.$body = $('body')
517 this.refresh()
518 this.process()
519 }
520
521 ScrollSpy.prototype = {
522

Callers

nothing calls this directly

Calls 7

$Function · 0.85
isMethod · 0.80
extendMethod · 0.80
onMethod · 0.80
replaceMethod · 0.80
refreshMethod · 0.65
processMethod · 0.65

Tested by

no test coverage detected