Fork me on GitHub

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

Range Toggle Filter Control Usage

Range Toggle Filter 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">						
		<!-- Button Text Filters Group Control -->
		<div class="jplist-group">
		   <ul>
			  <li>
				 <!-- range filter -->
				 <span
					data-control-type="range-filter"
					data-control-name="likes-range-filter"
					data-control-action="filter"
					data-path=".like"
					data-min="50"
					data-max="100">
					   <i class="fa fa-caret-right"></i>
					   Likes: 50 - 100
				 </span>
			  </li>
			  <li>
				 <!-- range filter -->
				 <span
					data-control-type="range-filter"
					data-control-name="view-range-filter"
					data-control-action="filter"
					data-path=".view"
					data-min="20"
					data-max="200">
					   <i class="fa fa-caret-right"></i>
					   Views: 20 - 200
				 </span>
			  </li>
			  
			  <li>
				 <!-- range filter -->
				 <span
					data-control-type="range-filter"
					data-control-name="price-range-filter"
					data-control-action="filter"
					data-path=".price"
					data-min="30">
					   <i class="fa fa-caret-right"></i>
					   Prices: 30+
				 </span>
			  </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>