2012-01-28 03:36:37 -05:00
|
|
|
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
|
|
|
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
|
|
|
// ++++++++++++++++++++++++++++++++++++++++++
|
2011-12-21 21:42:43 -05:00
|
|
|
|
2012-01-28 03:36:37 -05:00
|
|
|
!function ($) {
|
2011-12-21 21:42:43 -05:00
|
|
|
|
2012-01-28 03:36:37 -05:00
|
|
|
$(function(){
|
2012-01-24 20:13:02 -05:00
|
|
|
|
2012-08-15 00:06:08 -04:00
|
|
|
var $window = $(window)
|
2013-07-29 01:23:20 -04:00
|
|
|
var $body = $(document.body)
|
2012-08-15 00:06:08 -04:00
|
|
|
|
2013-07-26 22:25:45 -04:00
|
|
|
var navHeight = $('.navbar').outerHeight(true) + 10
|
|
|
|
|
2013-07-29 01:23:20 -04:00
|
|
|
$body.scrollspy({
|
2013-07-26 22:25:45 -04:00
|
|
|
target: '.bs-sidebar',
|
|
|
|
offset: navHeight
|
|
|
|
})
|
|
|
|
|
2013-08-11 18:03:48 -04:00
|
|
|
$window.on('load', function () {
|
|
|
|
$body.scrollspy('refresh')
|
|
|
|
})
|
|
|
|
|
2013-07-29 01:14:43 -04:00
|
|
|
$('.bs-docs-container [href=#]').click(function (e) {
|
2012-01-23 17:14:16 -05:00
|
|
|
e.preventDefault()
|
|
|
|
})
|
|
|
|
|
2013-03-30 21:41:26 -04:00
|
|
|
// back to top
|
2013-05-09 00:56:08 -04:00
|
|
|
setTimeout(function () {
|
2013-07-26 02:30:13 -04:00
|
|
|
var $sideBar = $('.bs-sidebar')
|
|
|
|
|
|
|
|
$sideBar.affix({
|
2013-05-09 00:56:08 -04:00
|
|
|
offset: {
|
2013-07-26 02:30:13 -04:00
|
|
|
top: function () {
|
|
|
|
var offsetTop = $sideBar.offset().top
|
|
|
|
var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10)
|
|
|
|
var navOuterHeight = $('.bs-docs-nav').height()
|
|
|
|
|
|
|
|
return (this.top = offsetTop - navOuterHeight - sideBarMargin)
|
|
|
|
}
|
|
|
|
, bottom: function () {
|
|
|
|
return (this.bottom = $('.bs-footer').outerHeight(true))
|
|
|
|
}
|
2013-05-09 00:56:08 -04:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}, 100)
|
2012-08-15 00:06:08 -04:00
|
|
|
|
2013-03-30 21:41:26 -04:00
|
|
|
setTimeout(function () {
|
2013-05-09 01:52:48 -04:00
|
|
|
$('.bs-top').affix()
|
2013-03-30 21:41:26 -04:00
|
|
|
}, 100)
|
|
|
|
|
2012-01-28 03:46:04 -05:00
|
|
|
// tooltip demo
|
2012-06-05 21:25:46 -04:00
|
|
|
$('.tooltip-demo').tooltip({
|
2013-08-14 17:29:53 -04:00
|
|
|
selector: "[data-toggle=tooltip]",
|
|
|
|
container: "body"
|
2012-01-28 03:46:04 -05:00
|
|
|
})
|
2012-01-26 19:12:34 -05:00
|
|
|
|
2012-01-28 15:08:41 -05:00
|
|
|
$('.tooltip-test').tooltip()
|
|
|
|
$('.popover-test').popover()
|
2012-01-28 03:46:04 -05:00
|
|
|
|
2013-03-28 02:33:45 -04:00
|
|
|
$('.bs-docs-navbar').tooltip({
|
|
|
|
selector: "a[data-toggle=tooltip]",
|
|
|
|
container: ".bs-docs-navbar .nav"
|
|
|
|
})
|
|
|
|
|
2012-01-28 03:46:04 -05:00
|
|
|
// popover demo
|
2013-07-26 22:50:02 -04:00
|
|
|
$("[data-toggle=popover]")
|
2012-01-28 03:46:04 -05:00
|
|
|
.popover()
|
|
|
|
|
|
|
|
// button state demo
|
|
|
|
$('#fat-btn')
|
|
|
|
.click(function () {
|
|
|
|
var btn = $(this)
|
|
|
|
btn.button('loading')
|
|
|
|
setTimeout(function () {
|
|
|
|
btn.button('reset')
|
|
|
|
}, 3000)
|
|
|
|
})
|
|
|
|
|
|
|
|
// carousel demo
|
2013-02-16 05:47:15 -05:00
|
|
|
$('.bs-docs-carousel-example').carousel()
|
2012-01-28 03:46:04 -05:00
|
|
|
})
|
2012-01-28 03:36:37 -05:00
|
|
|
|
2012-12-23 06:51:46 -05:00
|
|
|
}(window.jQuery)
|