I have a jquery inline popup triggered on load after checking for a cookie to see whether they have seen it before. (I got a lot of help on this from the user JFK.)
What I'm trying to do is display lightbox popup if the user is viewing the site from inside the USA (like Hulu does if you are viewing from outside the US).
How would I modify this script to do that ?
This is loaded in the after jquery script, and the fancybox script. The code is
<script type="text/javascript">function openFancybox() {
setTimeout( function() {$('#various1').trigger('click'); },1000);}$(document).ready(function() {
var visited = $.cookie('visited');
if (visited == 'yes') {
return false;
} else {openFancybox();
}
$.cookie('visited', 'yes', { expires: 1 });
$('#various1').fancybox();});</script>