Fork me on GitHub

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

Radio Buttons Dropdown Control Usage

Radio Buttons Dropdown 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>	
<!-- radio buttons dropdown control styles and js -->
<link href="jplist.radio-buttons-dropdown.min.css" rel="stylesheet" type="text/css" />
<script src="jplist.radio-buttons-dropdown.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 dropdown -->
			<div 
				class="jplist-radio-buttons-dropdown"
				data-control-type="radio-buttons-dropdown" 
				data-control-name="category-radio-buttons-dropdown" 
				data-control-action="filter"
				data-panel-selected-text="Filtered by {selected}"
				data-panel-all-text="Filter by Category">
				
				<ul>
					<li>
						<input data-path="default" id="all-category-items" type="radio" name="radio-buttons-category"/>
						<label for="all-category-items">All</label>
					</li>
					
					<li>
						<input data-path=".architecture" id="architecture" type="radio" name="radio-buttons-category"/>
						<label for="architecture">Architecture</label>
					</li>
					
					<li>
						<input data-path=".christmas" id="christmas" type="radio" name="radio-buttons-category"/>
						<label for="christmas">Christmas</label>
					</li>
					
					<li>
						<input data-path=".nature" id="nature" type="radio" name="radio-buttons-category"/>
						<label for="nature">Nature</label>
					</li>
					
					<li>
						<input data-path=".food" id="food" type="radio" name="radio-buttons-category"/>
						<label for="food">Food</label>
					</li>
				</ul>
			</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>