Fork me on GitHub

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

Storage

jPList supports local storage and cookies to keep plugin state that is chosen by the visitor.

Local Storage:

<script type="text/javascript">
   $('document').ready(function(){
   
      $('#demo').jplist({
      
         ...
   
         ,storage: 'localstorage'		
         ,storageName: 'storage-name'
      });
   });
</script>

Cookies:

<script type="text/javascript">
   $('document').ready(function(){
   
      $('#demo').jplist({
      
         ...
   
         ,storage: 'cookies'		
         ,storageName: 'storage-name'
         ,cookiesExpiration: -1 //cookies expiration in minutes (-1 = cookies expire when browser is closed)
      });
   });
</script>

Every control can be excluded from storage (if storage is enabled) using data-control-storage="false" attribute:

<!-- filter by title -->
<div class="text-filter-box">
	<i class="fa fa-pencil jplist-icon"></i>
	
	<!--[if lt IE 10]>
	<div class="jplist-label">Filter by Title:</div>
	<![endif]-->
	
	<input 
		data-path=".title" 
		type="text" 
		value="" 
		placeholder="Filter by Title" 
		data-control-type="textbox" 
		data-control-name="title-filter" 
		data-control-action="filter"
		data-control-storage="false"
	/>
</div>