I don’t know why this code isn’t working. This code should make sure that only one ad pop is presented in a user session. If I remove the two cookie lines then it works but not with the two cookie lines. Please help:
<script type="text/javascript">
var zflag_nid="1185";
var zflag_cid="3307";
var zflag_sid="823";
var zflag_width="1";
var zflag_height="1";
var zflag_sz="15";
if(!jQuery.cookie('myCookie1')) {
jQuery.cookie('myCookie1','myValue');
jQuery.getScript("http://d8.zedo.com/jsc/d8/fo.js",function(){ alert("Loaded");});
}
</script>
Make sure that you’re including the jQuery cookie library before you call this code:
You can download the jQuery Cookie Plugin here.
You must load the plugins before running that code. You can work around it by doing the following:
within your script block. This will make sure that the entire page is loaded before the code is run. However, you absolutely must include the plugin code somewhere in your page for this to work.