Totally Zenned
- Join Date:
- Jul 2012
- Posts:
- 16,908
- Plugin Contributions:
- 2
Zen Colorbox
mikebr:
I was working with the tpl_footer.php and added the following code:
<script> jQuery(function($) { $("#productMainImage").click(function(){ var sty=$( "#productMainImage" ).attr( "style" ); $("#cboxContent").attr("style", sty); }) }) </script>This seems to do the trick
Any thoughts
Thanx
Mike
So I think the colorbox code adds some amount of style information to the displayed image. I would think that the background image would be added to that information rather than replace it. The other thing was that I was thinking that perhaps the executed code loaded from the footer might be better suited in a colorbox "event" loader. At least then it may stay together with the colorbox files and logic. If not done that way, would still suggest "testing" for the existence of #cboxContent to be sure that at some future point this additional code wouldn't cause a javascript error that could affect site operation.
Just my two cents worth.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...