View Single Post
  #5  
Old 11-19-2011, 11:55 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Colorbox in 4.4.4

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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote