2011-05-03 18:12:43 -07:00
|
|
|
$(document).ready(function(){
|
2011-05-05 00:59:16 -07:00
|
|
|
|
2011-06-27 16:47:12 -07:00
|
|
|
// table sort example
|
2011-07-01 21:37:12 -07:00
|
|
|
// ==================
|
|
|
|
|
2011-09-08 20:21:03 -07:00
|
|
|
$("#sortTableExample").tablesorter( { sortList: [[ 1, 0 ]] } )
|
2011-05-05 00:59:16 -07:00
|
|
|
|
2011-07-01 21:37:12 -07:00
|
|
|
|
|
|
|
// add on logic
|
|
|
|
// ============
|
|
|
|
|
2011-09-08 20:21:03 -07:00
|
|
|
$('.add-on :checkbox').click(function () {
|
2011-05-05 00:59:16 -07:00
|
|
|
if ($(this).attr('checked')) {
|
2011-09-08 20:21:03 -07:00
|
|
|
$(this).parents('.add-on').addClass('active')
|
2011-05-05 00:59:16 -07:00
|
|
|
} else {
|
2011-09-08 20:21:03 -07:00
|
|
|
$(this).parents('.add-on').removeClass('active')
|
2011-05-05 00:59:16 -07:00
|
|
|
}
|
2011-09-08 20:21:03 -07:00
|
|
|
})
|
2011-07-01 21:30:12 -07:00
|
|
|
|
2011-07-01 21:37:12 -07:00
|
|
|
|
2011-06-30 15:56:25 -07:00
|
|
|
// Disable certain links in docs
|
2011-07-01 21:37:12 -07:00
|
|
|
// =============================
|
2011-09-16 09:55:12 -07:00
|
|
|
// Please do not carry these styles over to your projects, it's merely here to prevent button clicks form taking you away from your spot on page
|
2011-07-01 21:37:12 -07:00
|
|
|
|
2011-09-08 20:21:03 -07: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 00:59:16 -07:00
|
|
|
|
2011-06-30 10:40:28 -07:00
|
|
|
// Copy code blocks in docs
|
2011-09-08 20:21:03 -07:00
|
|
|
$(".copy-code").focus(function () {
|
2011-08-19 20:37:12 -07:00
|
|
|
var el = this;
|
|
|
|
// push select to event loop for chrome :{o
|
2011-09-17 14:20:51 -07:00
|
|
|
setTimeout(function () { $(el).select(); }, 0);
|
2011-06-30 10:40:28 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2011-09-08 20:21:03 -07:00
|
|
|
// POSITION STATIC TWIPSIES
|
|
|
|
// ========================
|
2011-05-05 00:59:16 -07:00
|
|
|
|
2011-09-15 21:19:39 -07:00
|
|
|
$(window).bind( 'load resize', function () {
|
2011-09-10 22:54:47 -07:00
|
|
|
$(".twipsies a").each(function () {
|
|
|
|
$(this)
|
|
|
|
.twipsy({
|
|
|
|
live: false
|
|
|
|
, placement: $(this).attr('title')
|
|
|
|
, trigger: 'manual'
|
|
|
|
, offset: 2
|
|
|
|
})
|
2011-09-11 21:03:17 -07:00
|
|
|
.twipsy('show')
|
2011-09-10 14:52:45 -07:00
|
|
|
})
|
2011-09-10 22:54:47 -07:00
|
|
|
})
|
2011-08-26 00:00:05 -07:00
|
|
|
});
|