jellybeans87
jellybeans87

Reputation: 55

Javascript not working, says class is undefined

I'm trying to work with Ultra Cart and its giving me a huge headache. I'm using Moo tools also, and it seems that the pages are not connecting to j query. I referenced it properly but its not working. I'm new to JavaScript, so any help would be lovely. Is there something else that I need to add to use classes?

var Checkout = new Class({

var UltraCart = new Class({

MooTools.More={

The debugger says it something wrong with the first line in each script.

Here's some links to the script online:

view-source:http://www.wclarkpublishing.com/checkout

https://www.wclarkpublishing.com/js/ultracart.js

https://www.wclarkpublishing.com/js/checkout.js

Upvotes: 2

Views: 1629

Answers (1)

arian
arian

Reputation: 708

You are loading MooTools after loading the ultracart.js file.

Load the javascript files in this order:

  • mootools-core.js
  • mootools-more.js
  • ultracart.js
  • checkout.js
  • other js files

Your also loading jquery, which I think you are not using yet, so you could ditch that extra dependency.

Upvotes: 4

Related Questions