Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6832873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:54:42+00:00 2026-05-26T22:54:42+00:00

EDIT: I was having an issue with the cookie below so I switched to

  • 0

EDIT: I was having an issue with the cookie below so I switched to jQuery Cookie and still the error persist so I posted the jQuery Cookie code here but left my original question intact:

On one page I call colorbox and that code works properly yet on another page I changed the cookie name and function called and it breaks, here is that code:

var $j = jQuery.noConflict();
$j(window).load(function() {
//I have also tried - $j(document).ready(function(){ - 
///to see if that changed anything

if(!$j.cookie('homecookie')){
$j("#start").click(); 

//the click functions clicks a hidden link witch triggers a fancybox 
//lightbox to load - works properly in all but IE (have tested 8) in which
//the lightbox continues to load regardless of the cookie

$j.cookie("homecookie", 1, {expires: 30, path: '/'});
}
});

How can I get this to work in IE 8+ – No errors are thrown when the page loads. Here is the page in reference:

This Page Should Trigger Fancybox on First Visit Only

Note: I have tested the above cookie/script in FF, Chrome, Safari, and Opera and all work fine.


——–Original Question——–

I am using the following cookie:

var $j = jQuery.noConflict();

$j(document).ready(function(){

   if (document.cookie.indexOf('visited=true') == -1) 
   {
      var thirtyDays = 1000*60*60*24*30;
      var expires = new Date((new Date()).valueOf() + thirtyDays);
      document.cookie = "visited=true;path=/;expires=" + expires.toUTCString();
      $j.colorbox({ inline:true, href:"#gallery-nav-instruct"});
   }

});

It works in FF and Chrome but not in IE 8.

Cookies are allowed in the settings.

There are a couple issues, on one page the script is not triggered by IE (Colorbox) on another page the cookie is not reconizged and the script keeps getting called. Only change in the two scripts is changing the $j.colorbox({ inline:true, href:"#gallery-nav-instruct"}); to $j("#start").click();

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:54:43+00:00Added an answer on May 26, 2026 at 10:54 pm

    It appears that Fancybox was the issue. I switched to colorbox and using jQuery Cookie it works fine on the page I was having an issue yet it created another issue on another page that is a bit different.

    Here is the code that worked:

    var $j = jQuery.noConflict();
    $j(window).load(function() {
    if(!$j.cookie('homecookie')){
    $j.colorbox({ inline:true, href:"#home-welcome"});
    $j.cookie("homecookie", 1, {expires: 30});
    }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having an issue with Advanced Find->Edit Columns. I have a Lead and Opportunity entity.
I am having an issue with the following code and it is wrecking my
I'm having an issue with DDMS. System logs are appearing fine, but my own
EDIT: I am having an issue with reloading a div on a parent page
I'm having an issue with a Windows Forms project. I change tabs but the
Having an issue with type conversion in ASP classic. heres my code: Set trainingCost
Having an issue where the URL rewrite is running but the server will not
I'm having an issue with the HTML below: <html> <body> <p style=font-size: large> Some
EDIT: It seems to be something with having the two queues in the same
Edit 1: Uninstalled & Reinstalled Edit 2: Same problem. Seriously? Yes. I am having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.