Fork me on GitHub

jQuery jPList plugin is deprecated. Please check pure JavaScript (ES6) jPList Library alternative instead.

Radio Buttons Filters Control Usage

Radio Buttons Filters Control

Add jPList scripts to the HEAD:

    
<!-- jPList Core -->		
<link href="jplist.core.min.css" rel="stylesheet" type="text/css" />
<script src="jplist.core.min.js"></script>	

<!-- Toogle Filters Bundle -->			
<link href="jplist.filter-toggle-bundle.min.css" rel="stylesheet" type="text/css" />
<script src="jplist.filter-toggle-bundle.min.js"></script>

<script>
$('document').ready(function(){
	$('#demo').jplist({				
		itemsBox: '.list' 
		,itemPath: '.list-item' 
		,panelPath: '.jplist-panel'	
	});
	
});
</script>
			
	

Add basic HTML structure to the BODY:

    
<!-- demo -->
<div id="demo">
	
	<!-- panel -->
	<div class="jplist-panel">	
	
		<!-- radio buttons filters -->
		<div class="jplist-group">
		   
		   <input 
			  data-control-type="radio-buttons-filters"
			  data-control-action="filter"
			  data-control-name="default" 
			  data-path="default" 
			  
			  id="default-radio" 
			  type="radio" 
			  name="jplist"
			  checked="checked"
		   /> 
			  
		   <label for="default-radio">All</label>
		   
		   <input 									
			  data-control-type="radio-buttons-filters"
			  data-control-action="filter"
			  data-control-name="architecture" 
			  data-path=".architecture" 
			  
			  id="architecture" 
			  type="radio" 
			  name="jplist"
		   /> 
			  
		   <label for="architecture">Architecture</label>
		   
		   <input 
			  data-control-type="radio-buttons-filters"
			  data-control-action="filter"
			  data-control-name="christmas" 
			  data-path=".christmas" 
			  
			  id="christmas" 
			  type="radio"
			  name="jplist"
		   /> 
			  
		   <label for="christmas">Christmas</label>
		   
		   <input 
			  data-control-type="radio-buttons-filters"
			  data-control-action="filter"
			  data-control-name="nature" 
			  data-path=".nature" 
			  
			  id="nature" 
			  type="radio" 
			  name="jplist"
		   /> 
		   
		   <label for="nature">Nature</label>
		   
		   <input 
			  data-control-type="radio-buttons-filters"
			  data-control-action="filter"
			  data-control-name="sea" 
			  data-path=".sea" 
			  
			  id="sea" 
			  type="radio"
			  name="jplist"
		   /> 
		   
		   <label for="sea">Sea</label>
		   
		   <input 
			  data-control-type="radio-buttons-filters"
			  data-control-action="filter"
			  data-control-name="lifestyle" 
			  data-path=".lifestyle" 
			  
			  id="lifestyle" 
			  type="radio" 
			  name="jplist"
		   /> 
		   
		   <label for="lifestyle">Lifestyle</label>
		   
		</div>
		
	</div>				 
	
	<!-- HTML data -->   
	<div class="list">
		
		<!-- item 1 -->
		<div class="list-item">	
			...
		</div>
		
		<!-- item 2 -->
		<div class="list-item">	
			...
		</div>
		
		...
		
	</div>
	
	<!-- no results found -->
	<div class="jplist-no-results">
		<p>No results found</p>
	</div>
					
</div>