I want to delay a link for a period of 500 with javascript
Set your href
attribute as href="javascript:delay('URL')"
and JavaScript:
function delay (URL) {
setTimeout( function() { window.location = URL }, 500 );
}
If you want to delay every link on your page, you can do it with jQuery like this
$(function(){
$("a").click(function(evt){
var link = $(this).attr("href");
setTimeout(function() {
window.location.href = link;
}, 500);
});
});