Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Natasha 9 posts 99 karma points
    Oct 09, 2020 @ 01:32
    Natasha
    0

    Adding a jqyery cart

    Hi there I am trying to add a simple jquery shopping cart to a site however, whatever I add doesn't seem to be picking up the js file. I have currently got shopkart on this pagedemo shop page

    My code is as follows to link the js file:

    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
    </script>
    <script src="/scripts/shopkart.js"></script>
        <script>
    $(function () {
        $.shopkart();
    });
    </script>
    

    I have tried countless others which all work outside of Umbraco (on Dreamweaver for example) It's probably something simple, but I really can't work it out and have spent days on it already.

    Thanks in advance for your help, Natasha

  • Kenneth Radoor 2 posts 94 karma points
    Oct 09, 2020 @ 08:45
    Kenneth Radoor
    100

    Hi Natacha

    You are loading jQuery twice, in line 117 and 205. Try and move your script into the master at the bottem, and make sure you only load jQuery once.

    /Kenneth

Please Sign in or register to post replies

Write your reply to:

Draft