如何清除设置为通过jquery document.ready()调用触发的匿名函数?
例如:
<script type="text/javascript">
//some code sets a doc ready callback
$(document).ready(function ()
{
alert('ready');
});
//my attempt to prevent the callback from happening
window.onload = null;
$(document).unbind("ready");
</script>
Run Code Online (Sandbox Code Playgroud)
无论我试图绕过它,警报都会发生.有没有办法做到这一点?