Solved

Simple fancybox question

Posted on 2013-05-31
2
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Alert after MVC form submitted 1 28
ajax to record click 3 24
selected value 16 24
JSON/JQuery/AJAX Error Identification 2 24
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
The viewer will learn how to dynamically set the form action using jQuery.
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)

735 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