| 
									
										
										
										
											2011-05-04 09:12:43 +08:00
										 |  |  | $(document).ready(function(){ | 
					
						
							| 
									
										
										
										
											2011-05-05 15:59:16 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-11 13:14:57 +08:00
										 |  |  |   // Scrollspy
 | 
					
						
							|  |  |  |   // =========
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   $('body > .topbar').scrollSpy() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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-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-09-11 13:54:47 +08:00
										 |  |  |   $(window).load(function () { | 
					
						
							|  |  |  |     $(".twipsies a").each(function () { | 
					
						
							|  |  |  |        $(this) | 
					
						
							|  |  |  |         .twipsy({ | 
					
						
							|  |  |  |           live: false | 
					
						
							|  |  |  |         , placement: $(this).attr('title') | 
					
						
							|  |  |  |         , trigger: 'manual' | 
					
						
							|  |  |  |         , offset: 2 | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |         .trigger('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
										 |  |  | }); |