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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -