0

When I add Jquery FancyBox script the reviews on Yotpo would disappear.

Here's the script:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.js"></script> 
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/1.3.4/jquery.fancybox-1.3.4.pack.min.js"></script>

but when i removed the above script, the yotpo reviews will appear.

I'm using Bigcommerce.

zen
  • 383
  • 3
  • 10
  • 21
  • maybe because you already have a version of jQuery loaded in your page. You may not need to have two version of jQuery, a single version may handle all your jQuery plugins, however if Yotpo requires jQuery v1.9+ and you want to add fancybox v1.3.4, beware of this issue (and workaround) http://stackoverflow.com/q/14344289/1055987 – JFK May 10 '14 at 16:43
  • Thanks for your respond @JFK, i think i manage to solve this issue using – zen May 12 '14 at 03:26

1 Answers1

0

I manage to solved my issue using jQuery.noConflict. I just put the noConflict code after the conflict script.

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.js"></script> 
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/1.3.4/jquery.fancybox-1.3.4.pack.min.js"></script>

<script>jQuery.noConflict();</script>

Then always call jQuery with the whole word instead of the $ sign.

<script type="text/javascript">
jQuery(document).ready(function() {

jQuery(".iframe").fancybox({

   //codes

});

});
</script>
zen
  • 383
  • 3
  • 10
  • 21