Hi,
Like to get the apologies in now as I know I’m going to have alot people shouting I shouldn’t be doing this, and I know it’s not a great user experience but it’s at the clients request even after I advised against it.
What the client wants after access the first page from the index page they are presented with an ad for 10seconds and then redirected. I thought about using the meta refresh but sounds as this can harm the SEO, which also seems the case for a JS redirect.
So what I thought was a light box overlay sort of thing which pops up and then closes after 10 seconds. I’d opted for the jquery colorBox (
http://colorpowered.com/colorbox/) solution as it allows me to achieve the effect more or less but I’m the problem being is I’m using this on a page with ditto and pagination and every time I click the next button of pagination the page reloads the advert. I was wondering if there’s any way I could maybe remove the code after running once using jquery or even phx. Any help with this or an alternative solution would be much appreciated.
The jquery code i’m using
$(document).ready(function(){
$(".single").colorbox({open:true});
$().bind('cbox_complete', function(){
setTimeout($.fn.colorbox.close, 20000);
});
});
I could possible add something to this to do something after closing but not sure what i’d need to remove it and will it stay removed even after clicking next on ditto.
$().bind('cbox_cbox_closed', function(){
REMOVE CODE SOMEHOW
});
Many Thanks
Ben