客户端JSON对象过滤器:Filter.js

jopen 10年前

Filter.js是一个客户端JSON对象过滤器用来显示/隐藏html元素。可以指定多个筛选条件并彼此结合使用。

var settings = {    filter_criteria: {            country: ['#country_list input:checkbox .EVENT.click .SELECT.:checked', 'country_id'],            age: ['#age_list input:checkbox .EVENT.click .SELECT.:checked .TYPE.range', 'age'],            states: ['#state_list input:checkbox .EVENT.click .SELECT.:checked', 'states.ARRAY.state_id']      },     callbacks: filter_callbacks, //Define below.     and_filter_on: false,     filter_on_init: false,  //By default it is true.     search: { input: '#searchbox' },      filter_types: filter_type_functions //Define below  };

项目主页:http://www.open-open.com/lib/view/home/1409706071322