I use Laravel mix to manage my js files, here is my app.js :
window.$ = window.jQuery = require('./jquery-1.11.2.min.js');
require('./jquery.easing.1.3.js');
require('./bootstrap.min.js');
require('./SmoothScroll.js');
require('./jquery.scrollTo.min.js');
require('./jquery.localScroll.min.js');
require('./jquery.viewport.mini.js');
require('./jquery.countTo.js');
require('./jquery.appear.js');
require('./jquery.sticky.js');
require('./jquery.parallax-1.1.3.js');
require('./jquery.fitvids.js');
require('./owl.carousel.min.js');
require('./isotope.pkgd.min.js');
require('./imagesloaded.pkgd.min.js');
require('./jquery.magnific-popup.min.js');
require('./gmap3.min.js');
require('./wow.min.js');
require('./masonry.pkgd.min.js');
require('./jquery.simple-text-rotator.min.js');
require('./all.js');
the all.js contains all the logic and inits , so my problem is that some jQuery plugins don't work :
Uncaught TypeError: $(...).magnificPopup is not a function at init_lightbox (index.js?id=f95f3419a2325063a526:11289)
when I load my js in the traditional way <script ... in the same order as above all works but when I require
them it throws the error, please help, thank You
EDIT:
The init functions fire after the ducument is ready (in all.js) :
$(document).ready(function(){
$(window).trigger("resize");
init_classic_menu();
init_fullscreen_menu();
init_side_panel();
init_lightbox();
init_parallax();
init_shortcodes();
init_tooltips();
init_counters();
init_team();
initPageSliders();
init_map();
init_wow();
init_masonry();
});