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