javascript - Trying to use a link delay, but any code I try isn't working -


i trying create little .25 second link delay along zooming property, add artistic flare site. in order see zoom, need small link delay. have been trying code have found online reason delays don't work.

here example of 1 of code snippets have tried.

<li><a href="#" onclick="settimeout(window.document.location='http://******.net/html/****.html',250);">contact</a></li> 

any ideas why isn't working? keep in mind want few links on page have delay block of javascript or jquery assigns a href links delay not ideal.

this classic-asp project using vb-script.

<a onclick="return createtimedlink(this, myfunction, 2000);" href="http://******.net/html/****.html">link</a>

then have this

function createtimedlink(element, callback, timeout){   settimeout( function(){callback(element);}, timeout);   return false; }  function myfunction(element) {  /* block of code, no 'return false'. */   window.location = element.href;  } 

source: https://stackoverflow.com/a/6609164/5393628


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -