Skip to content

Instantly share code, notes, and snippets.

@zy108830
Created March 30, 2016 04:40
Show Gist options
  • Save zy108830/53f1f7ab65f7600612d22763da304cec to your computer and use it in GitHub Desktop.
Save zy108830/53f1f7ab65f7600612d22763da304cec to your computer and use it in GitHub Desktop.
jquery事件函数里面的定时执行函数的this指向window
/**
* 逻辑跳转
*/
$('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