Question

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.

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top