timeout_on = {}
timeout_off = {}
$('.flex_section a').each(function(){
var a = $(this).attr('id');
$('.flex_section #' + a).hover(function(){
timeout_on['some_id' + a] = setTimeout(function() { popup_show(a); }, 300);
});
})
function popup_show(type){
console.log(timeout_on)
}
为什么在控制台日志中我有像成才:
Object {some_id: 1}
Object {some_id: 5}
Object {some_id: 9}
洙数为+4,每.hover
什么这个整数意味着为什么它不是1,2,3,4 ...?我认为这将是一个setTimeout像50,231等数字,然后我会清除Timeout有0,但它不会像那样工作。
好,谢谢,所以在这里,每件事都可以。我必须在其他地方搜索bug – Wordica