Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Conversion Rate Optimization (https://www.warriorforum.com/conversion-rate-optimization/)
-   -   button pop (https://www.warriorforum.com/conversion-rate-optimization/1220029-button-pop.html)

glorbus 22nd September 2016 09:52 PM

button pop
 
hi, implemented a button pop as you can see on my landing page at hiddenhealthquest.com

the button pops up about 30 seconds into the video and it works great.

However I want to make it so that once the button does pop, it will be there when the visitor returns rather than them having to wait again for the ihdden element to pop up.

here is the script i currently have in the head
Code:

<!-- START PASTE HERE -->

<script type="text/javascript">
<!--

////////////////////////////////////////////
// CHANGE THE SECONDS DELAY BELOW TO //
// THE NUMBER OF SECONDS YOU WANT BEFORE //
// THE LINKS APPEAR //
////////////////////////////////////////////


$secondsdelay = 30;

////////////////////////////////////////////
// DO NOT EDIT THIS SECTION //
////////////////////////////////////////////


function unhide(divID) {
var item = document.getElementById(divID);
if (item) {
item.className=(item.className=='hidden')?'unhidde n':'hidden';
}
}


$delay = $secondsdelay*1000;

window.setTimeout("unhide('links')",$delay);

//--></script>

<STYLE TYPE="text/css">
.hidden { visibility: hidden; }
.unhidden { visibility: visible; }
</STYLE>


<!-- END PASTE HERE -->

and here is what i currently have in the body
Code:

<div id="links" class="hidden"><img class="wp-image-26 aligncenter" src="http://hiddenhealthquest.com/wp-content/uploads/2016/09/buybuybuy.png" alt="buybuybuy" width="361" height="348" /></div>
how can I change this to to behave how I specified earlier?

Iv been banging my head against the wall with this for the past 3 days, really hope someone can help.

ABN 27th September 2016 04:42 PM

Re: button pop
 
I think you'd be better off posting in a more appropriate category.

But to at least steer in a direction to accomplishing what you want..

1) Make use of cookies (jquery cookie makes it easy)
2) When unhide is triggered, set the cookie (hidden=no)
3) Add on ready function and read the cookie on page load,and if hidden equals no, trigger the unhide action/function


All times are GMT -6. The time now is 07:11 AM.