Add timeout before running script on window load

This commit is contained in:
chris committed 2013-10-20 19:13:20 +08:00
1 parent a9343e9a82
commit 4403ca3504
1 file changed
+6 -4
+6 -4
View File
@@ -29,10 +29,12 @@
<% if @edit %>
<script>
$(window).load(function() {
$('a').not('.nav').on('click', function(e){
e.preventDefault();
});
$('a').not('.nav').css("cursor", "default");
setTimeout(function(){
$('a').not('.nav').on('click', function(e){
e.preventDefault();
});
$('a').not('.nav').css("cursor", "default");
}, 200);
});
</script>
<style>