display image and script for a set period of time
- by Ryan Max
This is very similar to a question I asked the other day but my page code has become significantly more complicated and I need to revisit it. I've been using the following code:
$('#myLink').click(function() {
$('#myImg').attr('src', 'newImg.jpg');
setTimeout(function() { $('#myImg').attr('src', 'oldImg.jpg'); }, 15000);
});
To replace an…