Home > General > Affiliate Marketing Forum

How To Show Something For X Seconds Then Show Something Else? (3)


11-23-2012 11:43 PM #1 vidivo (Member)
How To Show Something For X Seconds Then Show Something Else?

Like for those clickbank videos, where they dont show the add to cart button until x amount of seconds.

Anyone know how to do this or the script / php needed?

Id like to have something like watch this video and then after x seconds change it to buy it now button or something.


Thanks!


11-24-2012 01:26 AM #2 driv (Member)

I dunno about scripting this manually, but you can do it easily w/ EVP... http://www.easyvideoplayer.com/evp-2.0

it's a clickbank product so you can buy thru your own hoplink if you want.


11-24-2012 04:06 AM #3 andy_a (Member)

Here you go:

[PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
#slow, .kinda-normal, .fast {
display: none;
padding: 10px;
font-size: 15px;
}
</style>
</head>

<body>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
/*
target: element (ID or class) you want to fade in (Ex. #buy-now, .buy-now)
time : how long you want to delay before you start fading in (in milliseconds)
speed : control how fast the fade is. Can either be 'slow', 'fast', or in milliseconds.
*/
function delayedFade(target, time, speed) {
setTimeout(function() {
$(target).fadeIn(speed)
}, time);
}

delayedFade('#slow', 500, 7000);
delayedFade('.kinda-normal', 6000, 'slow');
delayedFade('.fast', 300, 200);
});
</script>
</body>
<p><button type="submit" class="fast">Fast!</button></p>
<p><button type="submit" class="kinda-normal">Kinda Normal</button></p>
<p><button type="submit" id="slow">Slllooowwww...</button></p>
</html>
[/PHP]

You will need to run jQuery and you can either run it from Googles CDN like I did for this example or download and run it off your web server.

If you have any questions just post here.

Cheers,
A


Home > General > Affiliate Marketing Forum