You can find 2 example implemtations of it below. They each open in a new window, and each use slightly altered versions of the plugin. As I improve upon them I'll be posting updates.
- Simple example implementation of the Static Filter using a keyword search from Minnesota.
- Slightly more complex example implementation of the Static Filter using a dynically written JSONP feed of my foursquare checkins.
- Download It (zip file containing both examples)
The default param values are as follows:
$('#theList').palateExpander({
'sortListId' : 'sorter',
'resultListId' : 'fourSquare',
'alphaOnLoad' : false,
'filterType' : 'omni',
'pageSize' : 20,
'topPaging' : true,
'pageStatus' : true,
'bottomPaging' : true
});
I like to think that they're fairly intuitive once you start playing with them. If you pass a filterType of "Omni" it will write a toggle drop down that allows you to search inclusively or exclusively. If you select "exclusive" (either as an embed parameter or within the dropdown) your relevant results will have to meet all selected criteria. If you select "inclusive" anything that matches on any criteria will be deemed relevant.
I did leverage a chunk of my existing static paging plugin, and integrate it with the new static filtering functionality. Some modification was necessary. In the original static paging script the paging only gets written once. In the new filtering example it needs to get written repeatedly. The only drawback -in general- to this script is that sorting gets slower the more results you have being indexed. Paging is still fairly immediate however.
No comments:
Post a Comment