jquerydreamweavermodernizrflexsliderboilerplate

2 versions of JQuery which one to delete?


I have just started using html5 boilerplate and one problem I have come across is using the DW widget Flexslider2 which references the jquery-1.7.2.min.js from the head section in my document.

Boilerplate Modernizr references jquery-1.9.1.min.js at the end of the document so this cancels out 1.7.2.min and prevents the Slider from showing when the page is published, once the later script jquery-1.9.1.min.js is removed the Slider shows perfectly but does that mean that Modernizr script no longer functions?

The problem is obviously because the later script always overrides the 1st

How to get the 2 working from the same jQuery library (preferably the latest version)?


Solution

  • use modernizr.js in the head (because it won't work well in the body when rendering in IE7) then at the end before your jQuery-1.9.1.min.js and under that any jquery plugin you are using and after that the javascript you wrote to apply the jquery plugins or JS.

    The order of which you load is important: If you would first load your jQuery plugin and after that the jQuery-19.1.min.js it won't load properly because it won't understand your plugin without loading jQuery-1.9.1.min.js