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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:28:07+00:00 2026-06-14T13:28:07+00:00

I currently have a web site I am building, with an image gallery on

  • 0

I currently have a web site I am building, with an image gallery on the posts. My question here is:

How do I take the current image’s title attribute, and make it the document title.

Explained:

When image one, with a title of "Beautiful, isn’t it?" is opened in the gallery, the document title is "Beautiful, isn’t it?". Then, when image two, with the title of "Man! That car crash is horrible!" is in the gallery, the document title is "Man! That car crash is horrible!". This is a gallery, so images can be advanced within the FancyBox, and on change to the new image, the document title changes to the new image. When FancyBox is closed, document title returns to before (which could be defined in a variable at the beginning of the document, if necessary).

  • 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-14T13:28:08+00:00Added an answer on June 14, 2026 at 1:28 pm
    document.title = 'This is easy!';
    

    UPD:

    have look at callbacks http://fancyapps.com/fancybox/#docs

    $(document).ready(function() {
        var origTitle = document.title
    
        $("#single_1").fancybox({
              helpers: {
                  title : {
                      type : 'float'
                  }
              },
              afterShow: function() {
                document.title = $(this).attr('title');
              },
              afterClose: function () {
                 document.title = origTitle;
              }
          });
    });
    

    full code on http://jsbin.com/olufus/1

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

Sidebar

Related Questions

I currently have a web site hitting 7 Access DBs that I desperately need
I currently have a web site where users can select a custom theme. After
I have a c# mvc4 twitter bootstap appharbor web site. Currently I use Vimeo
I have a Clustered Windows Hosting site which currently hosts an MVC Web Application
I'm currently in the process of building our ASP.NET C# 3.5 Web site and
I currently building web management system using mvc3 In my application i have system
I currently have a website where I'm hosting a webservice with several web methods,
Currently I have a website and database solution, however I would like to take
We are building a new SharePoint 2007 web site to replace our intranet website
I am currently developing a Web Site (not a Web Application) in VS2008. I

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.