用法示例
define('switcher',function(Switcher){
var filter=new Switcher({
onchange: $.proxy(function(key){
this.change(key);
},this),
items:[{
name: '',
text: '全部'
},{
name: map.positive,
text: '正面',
title: '鼠标悬浮会看到一个提示'
},{
name: map.negative,
text: '负面'
},{
name: map.neutral,
text: '中性'
}]
});
filter.appendTo('#filters');
filter.check(map.positive);
});