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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:58:07+00:00 2026-06-10T07:58:07+00:00

I have only used the $.colorbox() function to display content successfully. If I have

  • 0

I have only used the $.colorbox() function to display content successfully.

If I have a div with id of “test”, and I call

$('#test').colorbox()

what is the expected behavior?

I expect that it will display the “test” div inside of a colorbox, but I have never seen that happen. Otherwise, what is the purpose of calling colorbox() on specific DOM elements?

I see that this form of colorbox() is referred to as “Ajax”. Does the $(mySelector).colorbox() usage assume that mySelector is a link and use that link’s href to perform an Ajax call and then insert the return content into the colorbox? If so, that is not clear to me from the documentation.

I’m using:

  • jQuery 1.6.4
  • colorbox 1.3.19
  • 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-10T07:58:09+00:00Added an answer on June 10, 2026 at 7:58 am

    If you refer to the sample page: http://www.jacklmoore.com/colorbox/example1/

    …or check out the documentation: http://www.jacklmoore.com/colorbox

    … you can see that the selector is intended to represent the item to be clicked. The behavior of the plugin depends on what the selector is.

    Calling colorbox() without any arguments on a random div will yield an empty colorbox when you click said div: http://jsfiddle.net/w6AqG/

    That is the expected behavior, presumably. Because this is a jQuery plugin written by a third party, the only way to know what the expectations are is to read the documentation (again, that’s http://www.jacklmoore.com/colorbox), OR, send the plugin author an email and ask him.

    I suggest you follow the samples.

    The minimum working example using inline elements:

    HTML

    <a id="show_test" href="#test">Show the test div</a>
    <div style="display:none;">
        <div id="test">This is a test</div>
    </div>
    

    Javascript

    $('#show_test').colorbox({inline:true});
    

    Try it: http://jsfiddle.net/K8eSc/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used auto complete textbox previously. That auto complete works only when i
I have a module that is being used to create only a few page
I'm have a page that will be used (and hence styled) only for printing.
I have only used SQLiteOpenHelper and it's not that easy to use. I wonder
I have done many CodeIgniter projects and in that i have only used $this->db->query
I have only used MapRoute and slightly wondering where Routes.Add is used and on
Since now I have only used plugin for editing and the way I use
I have a several functions which are quite large, and are only used in
I have used the '@media only screen' in my CSS to determine how and
I have only used jQuery UI a tiny amount and do not know it

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.