asp.net mvc 4 - Bundling multiple versions of Jquery -
i have asp mvc application using jquery nuget.
recently upgraded latest version on nuget 2.0.3. version doesn't support older browsers (specifically ie8).
there trick around using conditional comments.
my question best method make work bundling?
bundles.add(new scriptbundle("~/bundles/jquery").include( "~/scripts/jquery-{version}.js"));
i have added 2 bundles 1
bundles.add(new scriptbundle("~/bundles/jqueryold").include( "~/scripts/jquery-1.9*")); bundles.add(new scriptbundle("~/bundles/jquery").include( "~/scripts/jquery-2*"));
then on layout
@scripts.render("~/bundles/jqueryold") <![endif]--> <!--[if gte ie 9]><!--> @scripts.render("~/bundles/jquery") <!--<![endif]-->
or there better way? suggestions appreciated.
i think partly answered question can have
bundles.add(new scriptbundle("~/bundles/jquery_old").include( "~/scripts/jquery-1.9.*.js")); bundles.add(new scriptbundle("~/bundles/jquery").include( "~/scripts/jquery-2.*.js"));
you need add 2 different bundle names 1 can jquery old, second jquery.
Comments
Post a Comment