Created
March 30, 2016 04:40
-
-
Save zy108830/53f1f7ab65f7600612d22763da304cec to your computer and use it in GitHub Desktop.
jquery事件函数里面的定时执行函数的this指向window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 逻辑跳转 | |
*/ | |
$('input[type="radio"]').change(function(){ | |
if($(this).attr('jumpto')>1){ | |
setTimeout(function(){ | |
console.log(this);//window | |
},100); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment