Frustrated...
Couldn't get colorbox to work at first - then I remembered the js caching pref (Use speed-up tool for Javascript) - so I disabled it, and everything worked as expected.
I read this
help file document --
And I disabled the js and css speedup tools, ran cleanup.php as suggested, and yes, colorbox works great -- until I enable the js speedup pref.
yes, I added the code to htaccess as described.
"Use speed-up tool for Javascript" must be disabled in order for colorbox to work.
Bug/Defect, or operator error?
Here is the code I added to /common_files/customer/service_head.tpl
Code:
{* BEGIN added by JR for COLORBOX js load on product pages *}
{if $main eq "product"}
{load_defer file="lib/colorbox/colorbox.css" type="css"}
{load_defer file="lib/colorbox/jquery.colorbox-min.js" type="js"}
{literal}
<script>
jQuery(document).ready(function () {
$(".iframe").colorbox({iframe:true, width:"50%", height:"60%"});
});
</script>
{/literal}
{/if}
{* END added by JR for COLORBOX js load on product pages *}
This is my first attempt at adding js or scripts to 4.4.4 -- so I must assume it's a caching issue.
What else could I be doing wrong here? Is there a better place for the js call? Colorbox docs suggest putting the script as close to </body> as possible, else use the
jQuery(document).ready(function () { function. So that's what I did for simplicity.
Looks like 4.4.x is not the same as earlier versions when it comes to js and css caching. Anyone with a 4.4.x store with added js code, talk to me, please?
Thx
J