title: jQuery Scroll not working. (Uncaught ReferenceError: jQuery is not defined )
body: <p>I have installed a theme on opencart 1.5.6.4 and for some reason the scroll carousel doesn't work. I have included the file below. Can anyone see any errors? Or also look at the website on chrome web inspector. </p>
  
  <p>The error on google chrome web inspector says </p>
  
  <blockquote>
    <p>Uncaught ReferenceError: jQuery is not defined</p>
  </blockquote>
  
  <p>But I am not very good with javascript so I don't know what the error could be. </p>
  
  <p><a href="http://ilovefancydress.com/" rel="nofollow">http://ilovefancydress.com/</a></p>
  
  <p><a href="http://ilovefancydress.com/catalog/view/theme/madame/js/jquery.jcarousel.min.js" rel="nofollow">Link to js file</a></p>
  
  <pre><code>(function(t) {
      "use strict";
      var i = t.jCarousel = {};
      i.version = "0.3.0-beta.5";
      var s = /^([+\-]=)?(.+)$/;
      i.parseTarget = function(t) {
          var i = !1,
              e = "object" != typeof t ? s.exec(t) : null;
          return e ? (t = parseInt(e[2], 10) || 0, e[1] &amp;&amp; (i = !0, "-=" ===
              e[1] &amp;&amp; (t *= -1))) : "object" != typeof t &amp;&amp; (t =
              parseInt(t, 10) || 0), {
              target: t,
              relative: i
          }
      }, i.detectCarousel = function(t) {
          for (var i; t.size() &gt; 0;) {
              if (i = t.filter("[data-jcarousel]"), i.size() &gt; 0) return i;
              if (i = t.find("[data-jcarousel]"), i.size() &gt; 0) return i;
              t = t.parent()
          }
          return null
      }, i.base = function(s) {
          return {
              version: i.version,
              _options: {},
              _element: null,
              _carousel: null,
              _init: t.noop,
              _create: t.noop,
              _destroy: t.noop,
              _reload: t.noop,
              create: function() {
                  return this._element.attr("data-" + s.toLowerCase(), !
                      0).data(s, this), !1 === this._trigger(
                      "create") ? this : (this._create(), this._trigger(
                      "createend"), this)
              },
              destroy: function() {
                  return !1 === this._trigger("destroy") ? this : (
                      this._destroy(), this._trigger("destroyend"),
                      this._element.removeData(s).removeAttr(
                          "data-" + s.toLowerCase()), this)
              },
              reload: function(t) {
                  return !1 === this._trigger("reload") ? this : (t &amp;&amp;
                      this.options(t), this._reload(), this._trigger(
                          "reloadend"), this)
              },
              element: function() {
                  return this._element
              },
              options: function(i, s) {
                  if (0 === arguments.length) return t.extend({},
                      this._options);
                  if ("string" == typeof i) {
                      if (s === void 0) return this._options[i] ===
                          void 0 ? null : this._options[i];
                      this._options[i] = s
                  } else this._options = t.extend({}, this._options,
                      i);
                  return this
              },
              carousel: function() {
                  return this._carousel || (this._carousel = i.detectCarousel(
                      this.options("carousel") || this._element
                  ), this._carousel || t.error(
                      'Could not detect carousel for plugin "' +
                      s + '"')), this._carousel
              },
              _trigger: function(i, e, r) {
                  var n, o = !1;
                  return r = [this].concat(r || []), (e || this._element)
                      .each(function() {
                          n = t.Event((i + "." + s).toLowerCase()),
                              t(this).trigger(n, r), n.isDefaultPrevented() &amp;&amp;
                              (o = !0)
                      }), !o
              }
          }
      }, i.plugin = function(s, e) {
          var r = t[s] = function(i, s) {
              this._element = t(i), this.options(s), this._init(),
                  this.create()
          };
          return r.fn = r.prototype = t.extend({}, i.base(s), e), t.fn[s] =
              function(i) {
                  var e = Array.prototype.slice.call(arguments, 1),
                      n = this;
                  return "string" == typeof i ? this.each(function() {
                      var r = t(this).data(s);
                      if (!r) return t.error(
                          "Cannot call methods on " + s +
                          " prior to initialization; " +
                          'attempted to call method "' +
                          i + '"');
                      if (!t.isFunction(r[i]) || "_" === i.charAt(
                          0)) return t.error('No such method "' +
                          i + '" for ' + s + " instance");
                      var o = r[i].apply(r, e);
                      return o !== r &amp;&amp; o !== void 0 ? (n = o, !1) :
                          void 0
                  }) : this.each(function() {
                      var e = t(this).data(s);
                      e instanceof r ? e.reload(i) : new r(this,
                          i)
                  }), n
              }, r
      }
  })(jQuery),
  function(t, i) {
      "use strict";
      var s = function(t) {
          return parseFloat(t) || 0
      };
      t.jCarousel.plugin("jcarousel", {
          animating: !1,
          tail: 0,
          inTail: !1,
          resizeTimer: null,
          lt: null,
          vertical: !1,
          rtl: !1,
          circular: !1,
          underflow: !1,
          _options: {
              list: function() {
                  return this.element().children().eq(0)
              },
              items: function() {
                  return this.list().children()
              },
              animation: 400,
              transitions: !1,
              wrap: null,
              vertical: null,
              rtl: null,
              center: !1
          },
          _list: null,
          _items: null,
          _target: null,
          _first: null,
          _last: null,
          _visible: null,
          _fullyvisible: null,
          _init: function() {
              var t = this;
              return this.onWindowResize = function() {
                  t.resizeTimer &amp;&amp; clearTimeout(t.resizeTimer), t
                      .resizeTimer = setTimeout(function() {
                          t.reload()
                      }, 100)
              }, this
          },
          _create: function() {
              this._reload(), t(i).on("resize.jcarousel", this.onWindowResize)
          },
          _destroy: function() {
              t(i).off("resize.jcarousel", this.onWindowResize)
          },
          _reload: function() {
              this.vertical = this.options("vertical"), null == this.vertical &amp;&amp;
                  (this.vertical = this.list().height() &gt; this.list()
                      .width()), this.rtl = this.options("rtl"), null ==
                  this.rtl &amp;&amp; (this.rtl = function(i) {
                      if ("rtl" === ("" + i.attr("dir")).toLowerCase())
                          return !0;
                      var s = !1;
                      return i.parents("[dir]").each(function() {
                          return /rtl/i.test(t(this).attr(
                                  "dir")) ? (s = !0, !1) :
                              void 0
                      }), s
                  }(this._element)), this.lt = this.vertical ? "top" :
                  "left", this._items = null;
              var i = this._target &amp;&amp; this.index(this._target) &gt;= 0 ?
                  this._target : this.closest();
              this.circular = "circular" === this.options("wrap"),
                  this.underflow = !1;
              var s = {
                  left: 0,
                  top: 0
              };
              return i.size() &gt; 0 &amp;&amp; (this._prepare(i), this.list().find(
                      "[data-jcarousel-clone]").remove(), this._items =
                  null, this.underflow = this._fullyvisible.size() &gt;=
                  this.items().size(), this.circular = this.circular &amp;&amp;
                  !this.underflow, s[this.lt] = this._position(i) +
                  "px"), this.move(s), this
          },
          list: function() {
              if (null === this._list) {
                  var i = this.options("list");
                  this._list = t.isFunction(i) ? i.call(this) : this._element
                      .find(i)
              }
              return this._list
          },
          items: function() {
              if (null === this._items) {
                  var i = this.options("items");
                  this._items = (t.isFunction(i) ? i.call(this) :
                      this.list().find(i)).not(
                      "[data-jcarousel-clone]")
              }
              return this._items
          },
          index: function(t) {
              return this.items().index(t)
          },
          closest: function() {
              var i, e = this,
                  r = this.list().position()[this.lt],
                  n = t(),
                  o = !1,
                  a = this.vertical ? "bottom" : this.rtl ? "left" :
                  "right";
              return this.rtl &amp;&amp; !this.vertical &amp;&amp; (r = -1 * (r +
                      this.list().width() - this.clipping())), this.items()
                  .each(function() {
                      if (n = t(this), o) return !1;
                      var l = e.dimension(n);
                      if (r += l, r &gt;= 0) {
                          if (i = l - s(n.css("margin-" + a)), !(
                              0 &gt;= Math.abs(r) - l + i / 2))
                              return !1;
                          o = !0
                      }
                  }), n
          },
          target: function() {
              return this._target
          },
          first: function() {
              return this._first
          },
          last: function() {
              return this._last
          },
          visible: function() {
              return this._visible
          },
          fullyvisible: function() {
              return this._fullyvisible
          },
          hasNext: function() {
              if (!1 === this._trigger("hasnext")) return !0;
              var t = this.options("wrap"),
                  i = this.items().size() - 1;
              return i &gt;= 0 &amp;&amp; (t &amp;&amp; "first" !== t || i &gt; this.index(
                      this._last) || this.tail &amp;&amp; !this.inTail) ? !0 :
                  !1
          },
          hasPrev: function() {
              if (!1 === this._trigger("hasprev")) return !0;
              var t = this.options("wrap");
              return this.items().size() &gt; 0 &amp;&amp; (t &amp;&amp; "last" !== t ||
                  this.index(this._first) &gt; 0 || this.tail &amp;&amp;
                  this.inTail) ? !0 : !1
          },
          clipping: function() {
              return this._element["inner" + (this.vertical ?
                  "Height" : "Width")]()
          },
          dimension: function(t) {
              return t["outer" + (this.vertical ? "Height" : "Width")]
                  (!0)
          },
          scroll: function(i, e, r) {
              if (this.animating) return this;
              if (!1 === this._trigger("scroll", null, [i, e])) return
                  this;
              t.isFunction(e) &amp;&amp; (r = e, e = !0);
              var n = t.jCarousel.parseTarget(i);
              if (n.relative) {
                  var o, a, l, h, u, c, f, d, _ = this.items().size() -
                      1,
                      p = Math.abs(n.target),
                      m = this.options("wrap");
                  if (n.target &gt; 0) {
                      var v = this.index(this._last);
                      if (v &gt;= _ &amp;&amp; this.tail) this.inTail ? "both" ===
                          m || "last" === m ? this._scroll(0, e, r) :
                          this._scroll(Math.min(this.index(this._target) +
                              p, _), e, r) : this._scrollTail(e, r);
                      else if (o = this.index(this._target), this.underflow &amp;&amp;
                          o === _ &amp;&amp; ("circular" === m || "both" ===
                              m || "last" === m) || !this.underflow &amp;&amp;
                          v === _ &amp;&amp; ("both" === m || "last" === m))
                          this._scroll(0, e, r);
                      else if (l = o + p, this.circular &amp;&amp; l &gt; _) {
                          for (d = _, u = this.items().get(-1); l &gt; d++;)
                              u = this.items().eq(0), c = this._visible
                              .index(u) &gt;= 0, c &amp;&amp; u.after(u.clone(!0)
                                  .attr("data-jcarousel-clone", !0)),
                              this.list().append(u), c || (f = {}, f[
                                      this.lt] = this.dimension(u) *
                                  (this.rtl ? -1 : 1), this.moveBy(f)
                              ), this._items = null;
                          this._scroll(u, e, r)
                      } else this._scroll(Math.min(l, _), e, r)
                  } else if (this.inTail) this._scroll(Math.max(this.index(
                      this._first) - p + 1, 0), e, r);
                  else if (a = this.index(this._first), o = this.index(
                          this._target), h = this.underflow ? o : a,
                      l = h - p, 0 &gt;= h &amp;&amp; (this.underflow &amp;&amp;
                          "circular" === m || "both" === m || "first" ===
                          m)) this._scroll(_, e, r);
                  else if (this.circular &amp;&amp; 0 &gt; l) {
                      for (d = l, u = this.items().get(0); 0 &gt; d++;) {
                          u = this.items().eq(-1), c = this._visible.index(
                                  u) &gt;= 0, c &amp;&amp; u.after(u.clone(!0).attr(
                                  "data-jcarousel-clone", !0)), this.list()
                              .prepend(u), this._items = null;
                          var g = s(this.list().position()[this.lt]),
                              y = this.dimension(u);
                          this.rtl &amp;&amp; !this.vertical ? g += y : g -=
                              y, f = {}, f[this.lt] = g + "px", this.move(
                                  f)
                      }
                      this._scroll(u, e, r)
                  } else this._scroll(Math.max(l, 0), e, r)
              } else this._scroll(n.target, e, r);
              return this._trigger("scrollend"), this
          },
          moveBy: function(t, i) {
              var e = this.list().position();
              return t.left &amp;&amp; (t.left = e.left + s(t.left) + "px"),
                  t.top &amp;&amp; (t.top = e.top + s(t.top) + "px"), this.move(
                      t, i)
          },
          move: function(i, s) {
              s = s || {};
              var e = this.options("transitions"),
                  r = !!e,
                  n = !!e.transforms,
                  o = !!e.transforms3d,
                  a = s.duration || 0,
                  l = this.list();
              if (!r &amp;&amp; a &gt; 0) return l.animate(i, s), void 0;
              var h = s.complete || t.noop,
                  u = {};
              if (r) {
                  var c = l.css(["transitionDuration",
                          "transitionTimingFunction",
                          "transitionProperty"
                      ]),
                      f = h;
                  h = function() {
                      t(this).css(c), f.call(this)
                  }, u = {
                      transitionDuration: (a &gt; 0 ? a / 1e3 : 0) +
                          "s",
                      transitionTimingFunction: e.easing || s.easing,
                      transitionProperty: a &gt; 0 ? function() {
                          return n || o ? "all" : i.left ?
                              "left" : "top"
                      }() : "none",
                      transform: "none"
                  }
              }
              o ? u.transform = "translate3d(" + (i.left || 0) + "," +
                  (i.top || 0) + ",0)" : n ? u.transform =
                  "translate(" + (i.left || 0) + "," + (i.top || 0) +
                  ")" : t.extend(u, i), r &amp;&amp; a &gt; 0 &amp;&amp; l.one(
                      "transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",
                      h), l.css(u), 0 &gt;= a &amp;&amp; l.each(function() {
                      h.call(this)
                  })
          },
          _scroll: function(i, e, r) {
              if (this.animating) return t.isFunction(r) &amp;&amp; r.call(
                  this, !1), this;
              if ("object" != typeof i ? i = this.items().eq(i) : i.jquery ===
                  void 0 &amp;&amp; (i = t(i)), 0 === i.size()) return t.isFunction(
                  r) &amp;&amp; r.call(this, !1), this;
              this.inTail = !1, this._prepare(i);
              var n = this._position(i),
                  o = s(this.list().position()[this.lt]);
              if (n === o) return t.isFunction(r) &amp;&amp; r.call(this, !1),
                  this;
              var a = {};
              return a[this.lt] = n + "px", this._animate(a, e, r),
                  this
          },
          _scrollTail: function(i, s) {
              if (this.animating || !this.tail) return t.isFunction(s) &amp;&amp;
                  s.call(this, !1), this;
              var e = this.list().position()[this.lt];
              this.rtl ? e += this.tail : e -= this.tail, this.inTail = !
                  0;
              var r = {};
              return r[this.lt] = e + "px", this._update({
                  target: this._target.next(),
                  fullyvisible: this._fullyvisible.slice(1).add(
                      this._visible.last())
              }), this._animate(r, i, s), this
          },
          _animate: function(i, s, e) {
              if (e = e || t.noop, !1 === this._trigger("animate"))
                  return e.call(this, !1), this;
              this.animating = !0;
              var r = this.options("animation"),
                  n = t.proxy(function() {
                      this.animating = !1;
                      var t = this.list().find(
                          "[data-jcarousel-clone]");
                      t.size() &gt; 0 &amp;&amp; (t.remove(), this._reload()),
                          this._trigger("animateend"), e.call(
                              this, !0)
                  }, this),
                  o = "object" == typeof r ? t.extend({}, r) : {
                      duration: r
                  },
                  a = o.complete || t.noop;
              return s === !1 ? o.duration = 0 : t.fx.speeds[o.duration] !==
                  void 0 &amp;&amp; (o.duration = t.fx.speeds[o.duration]), o
                  .complete = function() {
                      n(), a.call(this)
                  }, this.move(i, o), this
          },
          _prepare: function(i) {
              var e, r, n, o = this.index(i),
                  a = o,
                  l = this.dimension(i),
                  h = this.clipping(),
                  u = this.vertical ? "bottom" : this.rtl ? "left" :
                  "right",
                  c = this.options("center"),
                  f = {
                      target: i,
                      first: i,
                      last: i,
                      visible: i,
                      fullyvisible: h &gt;= l ? i : t()
                  };
              if (c &amp;&amp; (l /= 2, h /= 2), h &gt; l)
                  for (;;) {
                      if (e = this.items().eq(++a), 0 === e.size()) {
                          if (!this.circular) break;
                          if (e = this.items().eq(0), r = this._visible
                              .index(e) &gt;= 0, i.get(0) === e.get(0))
                              break;
                          if (r &amp;&amp; e.after(e.clone(!0).attr(
                                  "data-jcarousel-clone", !0)), this.list()
                              .append(e), !r) {
                              var d = {};
                              d[this.lt] = this.dimension(e) * (this.rtl ?
                                  -1 : 1), this.moveBy(d)
                          }
                          this._items = null
                      }
                      if (l += this.dimension(e), f.last = e, f.visible =
                          f.visible.add(e), n = s(e.css("margin-" + u)),
                          h &gt;= l - n &amp;&amp; (f.fullyvisible = f.fullyvisible
                              .add(e)), l &gt;= h) break
                  }
              if (!this.circular &amp;&amp; !c &amp;&amp; h &gt; l)
                  for (a = o;;) {
                      if (0 &gt; --a) break;
                      if (e = this.items().eq(a), 0 === e.size())
                          break;
                      if (l += this.dimension(e), f.first = e, f.visible =
                          f.visible.add(e), n = s(e.css("margin-" + u)),
                          h &gt;= l - n &amp;&amp; (f.fullyvisible = f.fullyvisible
                              .add(e)), l &gt;= h) break
                  }
              return this._update(f), this.tail = 0, c || "circular" ===
                  this.options("wrap") || "custom" === this.options(
                      "wrap") || this.index(f.last) !== this.items().size() -
                  1 || (l -= s(f.last.css("margin-" + u)), l &gt; h &amp;&amp; (
                      this.tail = l - h)), this
          },
          _position: function(t) {
              var i = this._first,
                  s = i.position()[this.lt],
                  e = this.options("center"),
                  r = e ? this.clipping() / 2 - this.dimension(i) / 2 :
                  0;
              return this.rtl &amp;&amp; !this.vertical ? (s -= this.clipping() -
                      this.dimension(i), s += r) : s -= r, !e &amp;&amp; (
                      this.index(t) &gt; this.index(i) || this.inTail) &amp;&amp;
                  this.tail ? (s = this.rtl ? s - this.tail : s +
                      this.tail, this.inTail = !0) : this.inTail = !1, -
                  s
          },
          _update: function(i) {
              var s, e = this,
                  r = {
                      target: this._target || t(),
                      first: this._first || t(),
                      last: this._last || t(),
                      visible: this._visible || t(),
                      fullyvisible: this._fullyvisible || t()
                  },
                  n = this.index(i.first || r.first) &lt; this.index(r.first),
                  o = function(s) {
                      var o = [],
                          a = [];
                      i[s].each(function() {
                              0 &gt; r[s].index(this) &amp;&amp; o.push(this)
                          }), r[s].each(function() {
                              0 &gt; i[s].index(this) &amp;&amp; a.push(this)
                          }), n ? o = o.reverse() : a = a.reverse(),
                          e._trigger("item" + s + "in", t(o)), e._trigger(
                              "item" + s + "out", t(a)), e["_" + s] =
                          i[s]
                  };
              for (s in i) o(s);
              return this
          }
      })
  }
  </code></pre>
  
  <p>Hope you can help.</p>
  
  
  
  <p>I have updated my include scripts but it is still not working.</p>
  
  <pre><code>&lt;script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/javascript/add2cart-go2cart/common.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/common.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/jquery.flexslider.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/fancybox/jquery.fancybox-1.3.4.pack.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/fancybox/fancybox.setting.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/jquery.accordion.source.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/jquery.tweet.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/bootstrap/bootstrap-tooltip.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="instafeed.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/theme/madame/js/jquery.jcarousel.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="catalog/view/javascript/jquery/nivo-slider/jquery.nivo.slider.pack.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This is the error I am getting in console: </p>
  
  <blockquote>
    <p>Uncaught TypeError: Failed to execute 'animate' on 'Element': 1 argument required, but only 0 present. ilovefancydress.com/catalog/view/javascript/jquery/jquery-1.7.1.min.js:3</p>
  </blockquote>