Add timeout before running script on window load

This commit is contained in:
chris 2013-10-20 19:13:20 +08:00
parent a9343e9a82
commit 4403ca3504
1 changed files with 6 additions and 4 deletions

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>