frio mobile: disable page scroll when aside is shown
This commit is contained in:
		
					parent
					
						
							
								1da4b9d942
							
						
					
				
			
			
				commit
				
					
						d162e689da
					
				
			
		
					 2 changed files with 17 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -338,6 +338,21 @@ $(document).ready(function(){
 | 
			
		|||
			$(document.body).trigger("sticky_kit:recalc");
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	 * Add or remove "aside-out" class to body tag
 | 
			
		||||
	 * when the mobile aside is shown or hidden.
 | 
			
		||||
	 * The class is used in css to disable scroll in page when the aside
 | 
			
		||||
	 * is shown.
 | 
			
		||||
	 */
 | 
			
		||||
	$("aside")
 | 
			
		||||
		.on("shown.bs.offcanvas", function() {
 | 
			
		||||
			$("body").addClass("aside-out");
 | 
			
		||||
		})
 | 
			
		||||
		.on("hidden.bs.offcanvas", function() {
 | 
			
		||||
			$("body").removeClass("aside-out");
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
function openClose(theID) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue