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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:28:57+00:00 2026-05-26T02:28:57+00:00

I’m using colorbox (jquery plug-in) to display a multi-step sign-up process. I’m using colorbox

  • 0

I’m using colorbox (jquery plug-in) to display a multi-step sign-up process. I’m using colorbox in “iframe” mode.

$('#signup').colorbox({
    width:     '500px', 
    height:    '250px', 
    opacity:   '.5',
    scrolling: false,
    fixed:     true,
    iframe:    true
});

Since the content of the different steps have different heights, I would like for colorbox to resize itself automatically when it loads a new step.

I use the following code in the iframe content (simply in a script tag near the end of the document):

$(function() {
    var iH = $(document.body).height();
    console.log("iframe height: " + iH);
    parent.$.colorbox.resize('height', iH);
}); 

Before that I had tried a simpler version:

parent.$.colorbox.resize();

But in both cases I end up with what seems to be an infinite loop: the content of the iframe is endlessly reloaded and never actually displayed (I can actually see it blink sometimes).
The iframe is resized in the process (during the first loop), so it seems to be partially working. However the new size appears to be too small for the intended content, so I don’t really know…

Any idea why this doesn’t work and how to solve this?

Update:
If I put the above script (simple version) on the second step and not on the first, I avoid the infinite loop, but when I click to go to the second step, the first step is actually loaded instead of the second step.
Same goes if I put this script on the third step: the first step is loaded instead.
So it seems that when executing its “resize” function, colorbox kind of restarts it all from the beginning?…

  • 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-26T02:28:58+00:00Added an answer on May 26, 2026 at 2:28 am

    I found a solution here: http://groups.google.com/group/colorbox/browse_thread/thread/fadc3d68ca764de3/c38fa24136a6abd7?pli=1

    Added this to the colorbox.js (ColorBox v1.3.17.2, right before publicMethod.resize on r 533):

    publicMethod.myResize = function (iW, iH) { 
     if (!open) {
        return;
     }
     if (settings.scrolling) {
        return;
        }
     var speed = settings.transition === "none" ? 0 : settings.speed;
     $window.unbind('resize.' + prefix);
     settings.w = iW;
     settings.h = iH;
     $loaded.css({
        width: settings.w,
        height: settings.h
     });
     publicMethod.position(speed);
    }; 
    

    and I added this to the page opening in the iframe:

     $(document).ready(function (){
        $(window).bind('load', function () {
            var frameWidth = $(document).width();
            var frameHeight = $(document).height();
            parent.$.fn.colorbox.myResize(frameWidth, frameHeight);
        });
     });
    

    To bind the colorbox function i used this options:

    $('.item').colorbox({
        transition: 'none',
        iframe      : true,
        scrolling   : false
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
I am reading a book about Javascript and jQuery and using one of the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.