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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:33:57+00:00 2026-06-12T16:33:57+00:00

I’ve been struggling with this for days… hopefully this will bring some light into

  • 0

I’ve been struggling with this for days… hopefully this will bring some light into it.

I’m building a portfolio WP. It only displays image thumbnails, with a.video elements that call the fancybox. In the tags, the attributes have the information for the fancybox to load the content. The “href=” is the url of the video to show, the “title=” is the title of the post, etc.

I want to somehow bring the content of the post to the fancybox window and display it as the title (caption under the video).

My approach so far has been to bring the content of the post into the <a> tags and then passing that content into the FBox .js file.

I’ve brought the post content (the_content) to a custom attribute for <a>, eventid= and also have brought it to INSIDE the tags.

I’ve got that working: the post content are loaded in the index page both as the “eventid=” attribute and as the text inside the <a> tags.

This is how the Fbox calling element is loaded inside the WP loop in the index.

<a class="thumbnail-frame excerpt-text <?php if($video_url !='' || $embeded_code != '')         : ?>video<?php else: ?>shots<?php endif; ?>"
<?php if($video_url !='' || $embeded_code != '') : ?><?php else: ?>rel="set-<?php    the_ID(); ?>"<?php endif; ?> 
href="<?php if($video_url !='' || $embeded_code != '') : ?>#embed-<?php the_ID(); ?><?php else: ?><?php echo $upload_image_1; ?><?php endif; ?>" 
title="<?php the_title(); ?>" eventid="<?php the_content(); ?>"><span class="post"><?php the_content(); ?></span></a>

However, I’m still having trouble in sending that text into the FBox javascript plugin so that the content is grabbed from the index and loaded in the Fbox.

The most I’ve done is

 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
 return '<span id="fancybox-title-over">' + jQuery("a.video").html() + '</span>';

That posts the content of the FIRST post only inside the Fbox (it gets the content of the first a.video element it finds).

I’ve tried with

 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
 return '<span id="fancybox-title-over">' + jQuery(this).html() + '</span>';

But it returns a null or undefined value and it prints it in the Fbox.

I’m stuck, I don’t know how to grab the specific text content for each post and bring it into the FBox. I was thinking maybe using a global variable?

I’m a student so I’m clearly super novice, I just really want to surpass this obstacle.

Here’s the link to the blog so you understand what I’m talking about.

http://realitynext.heliohost.org/wordpress/

Thanks!

  • 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-12T16:33:58+00:00Added an answer on June 12, 2026 at 4:33 pm

    If you want to get all the a.video elements you need the .each() iterator:

    'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
      var string =  '<span id="fancybox-title-over">';
      jQuery("a.video").each(function() { string = string + $(this).html(); });
    return string + '</span>';
    }
    

    And if you want only the content of the element that was clicked you need this:

    'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
      return '<span id="fancybox-title-over">' + jQuery(currentArray[currentIndex]).html() + '</span>';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

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.