Fork me on GitHub

JavaScript Settings

<script type="text/javascript">	
$('document').ready(function(){
	
	$('#demo').jplist({
		
    //enable/disable logging information in the browser console
    debug: false
			
    //the path to the items container
    ,itemsBox: '.list' 

    //the path to the item within the items container
    ,itemPath: '.list-item'

    //the path to the bundles and controls panel
    ,panelPath: '.panel'

    //the path to the 'no results' message
    ,noResults: '.jplist-no-results' 

    //the path to the mobile menu toggle button
    ,iosBtnPath: '.jplist-ios-button'

    //'redraw callback' function occurs on every jplist action like sort, filter, pagination etc.
    ,redrawCallback: '' 
			
    //animate to top - enabled by data-control-animate-to-top="true" attribute in control. 
    ,animateToTop: 'html, body'
    ,animateToTop: 0 //in milliseconds (1000 ms = 1 sec)

    //Fade animation effect
    //jplist.ext-animation.min.js should be added to make this effects work.
    ,effect: '' //'', 'fade'
    ,duration: 300			
    ,fps: 24			
			
    //save plugin state with storage
    ,storage: '' //'', 'cookies', 'localstorage'			
    ,storageName: 'jplist'
    ,cookiesExpiration: -1 //cookies expiration in minutes (-1 = cookies expire when browser is closed)
			
    //save plugin state with  deep links
    ,deepLinking: false
    ,hashStart: '#' //the start of the hash part, for example it may be '#!key='
    ,delimiter0: ':' //this delimiter is placed after the control name 
    ,delimiter1: '|' //this delimiter is placed between key-value pairs
    ,delimiter2: '~' //this delimiter is placed between multiple value of the same key
    ,delimiter3: '!' //additional delimiter
			
    //history settings
    ,historyLength: 10

    //jplist API default command
    ,command: 'init'
    ,commandData: {}
									
    //data source for jplist.core-ajax.min.js only
    ,dataSource: {
				
        type: 'html' //'html', 'server'
				
        //data source server side
        ,server: {
				
            //ajax settings
            ajax:{
                url: 'server.php'
                ,dataType: 'html'
                ,type: 'POST'
                //,cache: false
            }
            ,serverOkCallback: null
            ,serverErrorCallback: null
        }
						
        //render function for json + templates like handlebars, xml + xslt etc.
        ,render: null
		}
	});
});
</script>