I need a script that shows replay on the top right or left corners just like in many ads. I Googled it but didn't find anything useful. What I have is a set of images that run in a slide show kind of just like online ad's and when the ad ends "Replay" should appear on the top which 开发者_运维问答on click runs the ad again. Please help.
EDIT: I am using swissarmy.js for that slide thing and I need replay button in that only.
Please post you code, so we can help you better.
This could work... Start with a hidden replay link:
<div id="replay_link" style="display:none;">
<a href="#" onclick="my_function_name()">Replay</a>
</div>
In your javascript function: hide the link at the beginning of the function and show it again at the end.
function my_function_name()
{
// Hide 'Replay'
replay_link = document.getElementById('replay_link');
replay_link.style.display = 'none';
// Do slideshow
// Display 'Replay'
replay_link.style.display = 'block';
}
精彩评论