Here is our code:
<script type="text/javascript">
$(document).ready(function() {
$('a#installfc').click(function(e){
e.preventDefault();
window.open("http://www.site.com/ads/tr.php?src=source",'_parent');
$(this).html("Opening Download Link.. Please wait").delay(3000).html("Please run the installer after downloading");
});
});
</script>
Basically, we want the message to display, and then 3 seconds later it changes to another message.
What am I doing wrong?
~ jquery noob.
Ive only really seen
delayused when doing jQuery animation effects. Its possible there is a way to use that method to do what you want, but you could just as easily fall back to standard javascriptsetTimeout:Live example: http://jsfiddle.net/TMgPD/