prettyPhoto Lightbox in C5
Permalink
Hi there
I am struggling to get the prettyPhoto lightbox to work within the C5 environment. I have the js and css files loading ok but I get no response only the picture loads into a fresh window.
In MyTheme folder I have PrettyPhoto in the js folder.
In header.php I have :
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/prettyPhoto/js/jquery.prettyPhoto.js"></script>
and in my default.php:
<link href="<?php echo $this->getThemePath()?>/js/prettyPhoto/css/prettyPhoto.css" rel="stylesheet" type="text/css" />
I THINK that it may be the document.ready script that is the problem:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_rounded', opacity: 0.50});
});
</script>
I am really not sure where it should go! However, I have got some js which runs my vertical menu working fine and the css for my theme is fine. So placing the js and css for prettyPhoto would appear to be ok. So maybe it is the document.ready bit that is the problem.
Any ideas?
Many thanks
Vern
I am struggling to get the prettyPhoto lightbox to work within the C5 environment. I have the js and css files loading ok but I get no response only the picture loads into a fresh window.
In MyTheme folder I have PrettyPhoto in the js folder.
In header.php I have :
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/prettyPhoto/js/jquery.prettyPhoto.js"></script>
and in my default.php:
<link href="<?php echo $this->getThemePath()?>/js/prettyPhoto/css/prettyPhoto.css" rel="stylesheet" type="text/css" />
I THINK that it may be the document.ready script that is the problem:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_rounded', opacity: 0.50});
});
</script>
I am really not sure where it should go! However, I have got some js which runs my vertical menu working fine and the css for my theme is fine. So placing the js and css for prettyPhoto would appear to be ok. So maybe it is the document.ready bit that is the problem.
Any ideas?
Many thanks
Vern
I'd like to know this also!
What does the html of the actual images look like? Your document.ready script indicates that it's looking for tags along the lines of <a rel="prettyPhoto" href="..."> -- do you have such tags in your template?
Also, make sure that document.ready script is in your header.php file (before the closing </head> tag).
Also, make sure that document.ready script is in your header.php file (before the closing </head> tag).