function bindEvent(arr,state){
var display = (state == 1 ? 'block' : 'none');
if (arr.length > 1) {
for (var i = 0; i < arr.length; i++) {
$originalElement.eq(arr[i]).on('click', function () { //这里的arr[i]是undefined
console.log(arr[i]);
$objnum.css('display', display);
});
}
} else {
$originalElement.eq(arr[0]).on('click',function(){
$objnum.css('display', display);
})
}
}
收到一只叮咚
相关分类