Solved

Simple fancybox question

Posted on 2013-05-31
2
321 Views
Last Modified: 2013-05-31
I know I must be doing something incredibly obviously wrong here, but for the life of me I can't see what.

I am just trying to use fancybox to show the contents of a hidden div in my page. But when I click on the link, fancybox just shows a tiny empty box.

You can see an example here:
http://s1053289.instanturl.net/fancyboxtest.html

And below is the full source:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script language="JavaScript" type="text/javascript" src="wp-content/themes/globalpartnerships/include/commonfunctions.js"></script>
<script src="http://www.google.com/jsapi"></script>
<script language="JavaScript" type="text/javascript" src="wp-content/themes/globalpartnerships/include/jqueryloader.js"></script>
<script language="JavaScript" type="text/javascript" src="wp-content/themes/globalpartnerships/include/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="wp-content/themes/globalpartnerships/include/fancybox/jquery.easing-1.3.pack.js"></script>
<script type=text/javascript>
$(document).ready(function()
{
	$("a.fancyboxtest").fancybox({	});
}); // $(document).ready(function()
</script>
<link href="wp-content/themes/globalpartnerships/stylesheet-int.css" rel="stylesheet" type="text/css" media="screen">
<link rel="stylesheet" href="wp-content/themes/globalpartnerships/include/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen">
</head>
<body>
      <a id="inline" href="#testcase" class="fancyboxtest">test case</a>
      <div id="testcase" style="display:none;">This is a test case</div>
</body>
</html>

Open in new window


Can anyone help put me out of my misery? :)

Thanks experts!
0
Comment
Question by:rascal
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39212185
Usage:
<body>
      <a id="inline" href="#testcase" class="fancyboxtest">test case</a>
      <div style="display:none"><div id="testcase">This is a test case</div></div>
</body>

Open in new window

0
 
LVL 1

Author Closing Comment

by:rascal
ID: 39212385
Ah, thanks so much Gary - I missed that the div I wanted to show had to be wrapped in an outer hidden div!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now