From b07b869b267bd07e80ac193632284a0370d5c72c Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 2 Jun 2012 18:15:23 -0700 Subject: rebuild assets --- js/bootstrap-scrollspy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-scrollspy.js') diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index dce371812..a210fa945 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -58,7 +58,7 @@ , href = $el.data('target') || $el.attr('href') , $href = /^#\w/.test(href) && $(href) return ( $href - && href.length + && $href.length && [[ $href.position().top, href ]] ) || null }) .sort(function (a, b) { return a[0] - b[0] }) -- cgit v1.2.3 From 354f99f0bd8e1c2dcf9e094245b71e2587bd78c1 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 2 Jun 2012 19:02:30 -0700 Subject: add length to parent dropdown check #3316 --- js/bootstrap-scrollspy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-scrollspy.js') diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index a210fa945..4416d2168 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -108,7 +108,7 @@ .parent('li') .addClass('active') - if (active.parent('.dropdown-menu')) { + if (active.parent('.dropdown-menu').length) { active = active.closest('li.dropdown').addClass('active') } -- cgit v1.2.3 From dcf75697ecd243517b23d8ef440f772d91f699c0 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sun, 22 Jul 2012 18:28:39 -0700 Subject: some progress on affix plugin --- js/bootstrap-scrollspy.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/bootstrap-scrollspy.js') diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index 4416d2168..e90cdccb9 100644 --- a/js/bootstrap-scrollspy.js +++ b/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()) -- cgit v1.2.3 From e510306196b6433dc73302d24ca58313d3a31ec7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 19 Aug 2012 23:07:18 -0700 Subject: bump versions to 2.1.0 --- js/bootstrap-scrollspy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-scrollspy.js') diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index e90cdccb9..df70ebdd7 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-scrollspy.js v2.0.4 + * bootstrap-scrollspy.js v2.1.0 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. -- cgit v1.2.3