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 8330539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:09:10+00:00 2026-06-09T02:09:10+00:00

I am trying to create a fancybox/lightbox warning that will display when a user

  • 0

I am trying to create a fancybox/lightbox warning that will display when a user visit my site using IE7. I was digging around on the Fancybox website and I came across this script that will allow the fancybox to display on the page launch. The I added an IE7 if statement to the mix. So my final code was something similar to the one below:

<!--[if IE 7]>
jQuery(document).ready(function() {
$.fancybox(
    '<h2>Hi!</h2><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque</p>',
    {
            'autoDimensions'    : false,
        'width'                 : 350,
        'height'                : 'auto',
        'transitionIn'      : 'none',
        'transitionOut'     : 'none'
    }
);
});
<![endif]-->

In short it didnt work. I put the code right after my body and also just to be clear I did have all of the js files and jquery files enabled in my head. Any ideas on how I can get this to work? Is there a better solution out there for doing this?

  • 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-06-09T02:09:11+00:00Added an answer on June 9, 2026 at 2:09 am
    <!--[if IE 7]>
    <script>
    jQuery(document).ready(function() {
    $.fancybox(
        '<h2>Hi!</h2><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque</p>',
        {
                'autoDimensions'    : false,
            'width'                 : 350,
            'height'                : 'auto',
            'transitionIn'      : 'none',
            'transitionOut'     : 'none'
        }
    );
    });
    </script>
    <![endif]-->
    

    You need the <script> tag.

    You could use a browser sniffing script instead of conditional commenting…

    Something like:

    if($.browser.msie && parseInt($.browser.version) < 8){ // This would catch IE7 and below
        //fancybox script   
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying create a small web application that allows a user to login
I'm trying create a gui using Tkinter that grabs a username and password and
I am trying to create a link to an image @user.image_url . This will
I'm currently trying create a service that will return results of a OLAP cube
im trying to make a lightbox popup that triggers is the user has not
I am trying to create my own next and previous arrows in a fancybox
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Ok so I am trying create a login script, here I am using PHP5
I'm trying to use create external controls for Fancybox, or somehow manipulate the controls
hi I'm trying create chat using node.js I see example in http://chat.nodejs.org/ I have

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.