From 76534619dd2e00ef7575225fec70eec5bd67a62a Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 7 Oct 2015 11:43:26 -0700 Subject: [PATCH 1/2] Added `target` property to ScrollSpyOptions The [docs](http://getbootstrap.com/javascript/#via-javascript-2) show this usage. ```js $('body').scrollspy({ target: '#navbar-example' }) ``` --- bootstrap/bootstrap.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/bootstrap.d.ts b/bootstrap/bootstrap.d.ts index 3545eb310..491eb3045 100644 --- a/bootstrap/bootstrap.d.ts +++ b/bootstrap/bootstrap.d.ts @@ -22,6 +22,7 @@ interface ModalOptionsBackdropString { interface ScrollSpyOptions { offset?: number; + target?: string; } interface TooltipOptions { From bd0b6d16f83b72157f5b6335571b18792d33627b Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 7 Oct 2015 11:46:26 -0700 Subject: [PATCH 2/2] Adding test for scrollspy with target --- bootstrap/bootstrap-tests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/bootstrap-tests.ts b/bootstrap/bootstrap-tests.ts index 71698101f..fa4409fe3 100644 --- a/bootstrap/bootstrap-tests.ts +++ b/bootstrap/bootstrap-tests.ts @@ -17,6 +17,7 @@ $('#myModal').modal('toggle'); $('.dropdown-toggle').dropdown(); $('#navbar').scrollspy(); +$('body').scrollspy({ target: '#navbar-example' }); $('#element').tooltip('show'); @@ -42,4 +43,4 @@ $('.typeahead').typeahead({ highlighter: item => "" }); -$('#navbar').affix(); \ No newline at end of file +$('#navbar').affix();