uiSlider: function(){
var arrLength = (this.cDat).length - 1,
value = this.cDat,
pieTitle = this.cDet,
config = this.anyChartConfig();
console.log( this.anyChartConfig(2) );
$( "#slider" ).slider({
range: "min",
min: 0,
max: arrLength,
step: 1,
change: function ( event, ui ) {
console.log( this.anyChartConfig(ui.value) );
}
})
.each(function() {
var opt = $(this).data().uiSlider.options;
var vals = opt.max - opt.min;
for (var i = 0; i <= vals; i++) {
var el = $('<label>'+ ( value[i]["title"] ) +'</label>').css('left',(i/vals*100)+'%');
$( "#slider" ).append(el);
}
});
},
在第一个 console.log() 中它正确显示,但在第二个 console.log() 中它给我一个错误 {Object 不支持属性或方法'anyChartConfig'}。而且我还想获取值并在更改后将其传递给函数,