You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
We are trying to add an embedded photo gallery to one of the web pages to show customer photos. Can someone give me an idea on how to add the following code so it does not conflict with the existing clickcart code?
5. Include the jQuery and ColorBox javascript files in your page header:
```html
<script type="text/javascript" src="/ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="path/to/resources/colorbox/jquery.colorbox.js"></script>
```
6. Include the ColorBox jquery call in your header:
```html
<script type="text/javascript">
$(document).ready(function(){
$("a[rel='colorbox']").colorbox({maxWidth: "90%", maxHeight: "90%", opacity: ".5"});
});
</script>
I'm getting these console erros.
ReferenceError: jQuery is not defined[Learn More] jquery.colorbox.js:6:2
TypeError: $ is not a function[Learn More] customer-gallery:275:5
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. jquery.min.js:3:3869
Last edited by timberguy (04-07-2017 07:13:35)
Offline
Edit your skin. Right below the jslib namespace call, add all the code you have. The line with 'googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' is not needed and will cause issues. In (6) change '$' to 'jQuery'.
Offline
AWESOME!!!
Thank you so much!
Offline