mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
greatly simply js plugins - remove js api where reasonable
This commit is contained in:
Vendored
+1
-24
@@ -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')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user