Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 22nd Sep 2016, 09:52 PM   #1
Warrior Member
 
Join Date: 2016
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default
button pop
Share on: 
fb share twitter share gplus share more share

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.
glorbus is offline  
Unread 27th Sep 2016, 04:42 PM   #2
ABN
Active Warrior
 
Join Date: 2014
Location: US
Posts: 52
Thanks: 2
Thanked 15 Times in 13 Posts
Default
Re: button pop
Share on: 
fb share twitter share gplus share more share

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
ABN is offline  
Closed Thread


Bookmarks

Tags
button, buy button, javascript, pop


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 12:51 PM.