diff options
| author | Jacob Thornton <[email protected]> | 2011-10-19 21:56:06 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-10-19 21:56:06 -0700 |
| commit | 8545fe97877dc275df40ab98d408f21ce9a362cf (patch) | |
| tree | 1748be70e5c1c3b96cb2d836a909350fd7855772 /js/bootstrap-scrollspy.js | |
| parent | c9669be1ec2862b88ffdb296191e82fed79f56a4 (diff) | |
| download | bootstrap-8545fe97877dc275df40ab98d408f21ce9a362cf.tar.xz bootstrap-8545fe97877dc275df40ab98d408f21ce9a362cf.zip | |
greatly simply js plugins - remove js api where reasonable
Diffstat (limited to 'js/bootstrap-scrollspy.js')
| -rw-r--r-- | js/bootstrap-scrollspy.js | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index 4b146e580..23bdf59e9 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -75,30 +75,7 @@ } - /* SCROLLSPY PLUGIN DEFINITION - * =========================== */ - - $.fn.scrollSpy = function( options ) { - var scrollspy = this.data('scrollspy') - - if (!scrollspy) { - return this.each(function () { - $(this).data('scrollspy', new ScrollSpy( this, options )) - }) - } - - if ( options === true ) { - return scrollspy - } - - if ( typeof options == 'string' ) { - scrollspy[options]() - } - - return this - } - - $(document).ready(function () { + $(function () { $('body').scrollSpy('[data-scrollspy] li > a') }) |
