2

I have a custom theme in which a certain template uses jQuery - everything works like a charm. I put the changes in the template from the default theme - everything OK. This is on my developer machine.

Then I put the changes, in both the custom and the default themes, on the testing machine (another, separate machine) and it works with the custom theme, but does not on the default theme. When debugging in FireBug, I get thrown exception on this line of code:

var $j = jQuery.noConflict();

whereas I get the ReferenceError: jQuery is not defined exception. This is weird, because the code on the dev machine and on the testing machine is completely identical for both the custom and the default themes.

closed as too broad by Marius, Keyul Shah, TBI Infotech, David Manners, MTM Sep 23 '14 at 9:32

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Make sure the jquery file is included in the dom. Also you may try to clear the cache. Maybe the layout that includes the jquery file is cached to an older version. – Marius Feb 6 '14 at 12:47
  • @Marius - cache is not the problem - everything was cleared. Also the jQuery library is included in the default/layout/page.xml in the head tag and I added a $.noConflict(); script in the header.phtml file of the theme. Still the same problem. – Syspect Feb 6 '14 at 14:10
  • 1
    How do you load jquery: google cdn or locally? Also, do you merge js files? – Evgeni Ivanov Feb 6 '14 at 14:41
  • do you have the merge js/css files option set? – David Manners May 21 '14 at 12:24