Solved

Simple fancybox question

Posted on 2013-05-31
2
327 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
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…

691 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