2011-10-20 12:56:06 +08:00
|
|
|
$(function(){
|
2011-05-05 15:59:16 +08:00
|
|
|
|
2011-06-28 07:47:12 +08:00
|
|
|
// table sort example
|
2011-07-02 12:37:12 +08:00
|
|
|
// ==================
|
|
|
|
|
2011-09-09 11:21:03 +08:00
|
|
|
$("#sortTableExample").tablesorter( { sortList: [[ 1, 0 ]] } )
|
2011-05-05 15:59:16 +08:00
|
|
|
|
2011-07-02 12:37:12 +08:00
|
|
|
|
|
|
|
// add on logic
|
|
|
|
// ============
|
|
|
|
|
2011-09-09 11:21:03 +08:00
|
|
|
$('.add-on :checkbox').click(function () {
|
2011-05-05 15:59:16 +08:00
|
|
|
if ($(this).attr('checked')) {
|
2011-09-09 11:21:03 +08:00
|
|
|
$(this).parents('.add-on').addClass('active')
|
2011-05-05 15:59:16 +08:00
|
|
|
} else {
|
2011-09-09 11:21:03 +08:00
|
|
|
$(this).parents('.add-on').removeClass('active')
|
2011-05-05 15:59:16 +08:00
|
|
|
}
|
2011-09-09 11:21:03 +08:00
|
|
|
})
|
2011-07-02 12:30:12 +08:00
|
|
|
|
2011-07-02 12:37:12 +08:00
|
|
|
|
2011-07-01 06:56:25 +08:00
|
|
|
// Disable certain links in docs
|
2011-07-02 12:37:12 +08:00
|
|
|
// =============================
|
2011-09-17 00:55:12 +08: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-02 12:37:12 +08:00
|
|
|
|
2011-09-09 11:21:03 +08: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 15:59:16 +08:00
|
|
|
|
2011-07-01 01:40:28 +08:00
|
|
|
// Copy code blocks in docs
|
2011-09-09 11:21:03 +08:00
|
|
|
$(".copy-code").focus(function () {
|
2011-08-20 11:37:12 +08:00
|
|
|
var el = this;
|
|
|
|
// push select to event loop for chrome :{o
|
|
|
|
setTimeout(function () { $(el).select(); }, 1);
|
2011-07-01 01:40:28 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2011-09-09 11:21:03 +08:00
|
|
|
// POSITION STATIC TWIPSIES
|
|
|
|
// ========================
|
2011-05-05 15:59:16 +08:00
|
|
|
|
2011-12-21 11:37:41 +08:00
|
|
|
$(window).on('load resize', function () {
|
2011-09-11 13:54:47 +08:00
|
|
|
$(".twipsies a").each(function () {
|
|
|
|
$(this)
|
|
|
|
.twipsy({
|
|
|
|
live: false
|
|
|
|
, placement: $(this).attr('title')
|
|
|
|
, trigger: 'manual'
|
|
|
|
, offset: 2
|
|
|
|
})
|
2011-09-12 12:03:17 +08:00
|
|
|
.twipsy('show')
|
2011-09-11 05:52:45 +08:00
|
|
|
})
|
2011-09-11 13:54:47 +08:00
|
|
|
})
|
2011-08-26 15:00:05 +08:00
|
|
|
});
|