bootstrap/docs/assets/js/application.js

63 lines
1.3 KiB
JavaScript
Raw Normal View History

2011-05-04 01:12:43 +00:00
$(document).ready(function(){
2011-07-02 04:37:12 +00:00
// Dropdown example for topbar nav
// ===============================
$('body').dropdown() // catch any dropdowns on the page
2011-07-02 04:37:12 +00:00
2011-09-11 05:14:57 +00:00
// Scrollspy
// =========
$('body > .topbar').scrollSpy()
// table sort example
2011-07-02 04:37:12 +00:00
// ==================
$("#sortTableExample").tablesorter( { sortList: [[ 1, 0 ]] } )
2011-07-02 04:37:12 +00:00
// add on logic
// ============
$('.add-on :checkbox').click(function () {
if ($(this).attr('checked')) {
$(this).parents('.add-on').addClass('active')
} else {
$(this).parents('.add-on').removeClass('active')
}
})
2011-07-02 04:30:12 +00:00
2011-07-02 04:37:12 +00:00
// Disable certain links in docs
2011-07-02 04:37:12 +00:00
// =============================
$('ul.tabs a, ul.pills a, .pagination a, .well .btn, .actions .btn, .alert-message .btn, a.close').click(function (e) {
e.preventDefault()
})
// Copy code blocks in docs
$(".copy-code").focus(function () {
2011-08-20 03:37:12 +00:00
var el = this;
// push select to event loop for chrome :{o
setTimeout(function () { $(el).select(); }, 1);
});
// POSITION STATIC TWIPSIES
// ========================
$(".twipsies a").each(function () {
$(this)
.twipsy({
live: false
, placement: $(this).attr('title')
, trigger: 'manual'
, offset: 2
})
.trigger('twipsy:show')
})
});