I’m having difficulty finding which jQuery plugin or something else in WordPress that is not allowing to load iframe with fancybox.
Easy Fancybox with stripped html works and below is the working version
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<!-- Add jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<link rel='stylesheet' id='easy-fancybox.css-css' href='http://www.wp-responsive-themes.com/wp-content/plugins/easy-fancybox/easy-fancybox.css.php?ver=1.3.4' type='text/css' media='screen' />
<script type='text/javascript' src='http://www.wp-responsive-themes.com/wp-content/plugins/easy-fancybox/fancybox/jquery.fancybox-1.3.4.pack.js?ver=1.3.4'></script>
</head>
<body>
<a href="http://wp-responsive-themes.com/" data-fancybox-type="iframe" title="preview" class="preview fancybox-iframe">Preview</a>
<script type="text/javascript">
jQuery(document).ready(function() {
$("a.preview").fancybox({
'Width' : 960 ,
'Height' : 640,
'hideOnContentClick': false,
'type':'iframe'
});
});
</script>
</body>
</html>
but fancybox can’t load iframe on the page (WordPress).
The iframe was supposed to open when “iPhone 5 Vertical Orientation Preview” is clicked
at the following page
http://www.wp-responsive-themes.com/2012/myapp-adaptive-wp-theme-for-app-developers-429/
Need Help
Kind Regards
WordPress is setup in such a way that jQuery is to be used without conflicts. This means $ is not readily available.
http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers
Adding the
$as a function parameter should solve your issue.