Kryptronic Software Support Forum

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.

#1 04-07-2017 07:12:59

timberguy
Member
Registered: 01-14-2008
Posts: 142

jquery issue

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="hmm/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

 

#2 04-07-2017 07:49:00

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: jquery issue

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'.


Nick Hendler

Offline

 

#3 04-07-2017 11:31:12

timberguy
Member
Registered: 01-14-2008
Posts: 142

Re: jquery issue

AWESOME!!!

Thank you so much!

Offline

 

Board footer