2

I added some js files in my custom theme using the file \app\design\frontend\<vendor>\<theme>\Magento_Theme\layout\default_head_blocks.xml

<link src="js/modernizr.custom.28468.js"/>
<link src="js/jquery.js"/>
<link src="js/bootstrap.min.js"/>
<link src="js/wow.js"/>
<link src="js/jquery.bxslider.js"/>
<link src="js/jquery_select.js"/>
<link src="js/page.js"/>

But it shows some errors in console, and functionality is not working properly

image

Any help will be appreciated.

VIPIN A ROY
  • 1,761
  • 5
  • 28
  • 41
Hima Mohan
  • 121
  • 1
  • 4
  • I'd hazard a guess that `modernizr...js` is probably dependent on jQuery. Thus jQuery must be referenced before it- I'm *sure* there's a duplicate, but I can't find a good one. Also using `` for JS is an odd practice, ` – HPierce Aug 03 '16 at 12:58
  • @HPierce Thanks for your reply. I have changed link to script and give order to jquery.js and modernizer..js. But still it is not working. – Hima Mohan Aug 04 '16 at 05:08

1 Answers1

5

This is because of some jquery conflicts in the js files you used. Please add the below code in your first line of page.js

var $ = jQuery.noConflict();
VIPIN A ROY
  • 1,761
  • 5
  • 28
  • 41