Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-07-23 05:28:39 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-07-23 05:28:39 +0400
commitdcf75697ecd243517b23d8ef440f772d91f699c0 (patch)
treef0bd9a5a2bd9c0e8a2dd09ceb4606009c5051181 /docs/assets/js/bootstrap-scrollspy.js
parentfa1e1e34dfd9e8501ffdbb92a282ff5550685f3c (diff)
some progress on affix plugin
Diffstat (limited to 'docs/assets/js/bootstrap-scrollspy.js')
-rw-r--r--docs/assets/js/bootstrap-scrollspy.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/assets/js/bootstrap-scrollspy.js b/docs/assets/js/bootstrap-scrollspy.js
index 4416d21684..e90cdccb97 100644
--- a/docs/assets/js/bootstrap-scrollspy.js
+++ b/docs/assets/js/bootstrap-scrollspy.js
@@ -23,15 +23,15 @@
"use strict"; // jshint ;_;
- /* SCROLLSPY CLASS DEFINITION
- * ========================== */
+ /* SCROLLSPY CLASS DEFINITION
+ * ========================== */
- function ScrollSpy( element, options) {
+ function ScrollSpy(element, options) {
var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element)
, href
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
- this.$scrollElement = $element.on('scroll.scroll.data-api', process)
+ this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
@@ -121,7 +121,7 @@
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
- $.fn.scrollspy = function ( option ) {
+ $.fn.scrollspy = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('scrollspy')
@@ -141,7 +141,7 @@
/* SCROLLSPY DATA-API
* ================== */
- $(function () {
+ $(window).on('load', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
$spy.scrollspy($spy.data())