0

I am using 8.2 latest version of Sitecore, and I met a problem with CSS loading on published website. In Experience Editor screen, everything is ok, css of carousel still work normally. But when I log out, the webpage which uses Web database has not loaded CSS, carousel has stopped. I included essential CSS files. I also tried to config IIS in Win 10 CSS, Images, JS not loading in IIS.


I checked the console in Inspect Element. It has errors: ReferenceError: jQuery is not defined in ThumbCarousel.js


Here is my header HTML:

head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>@Html.Sitecore().Field("title", new { DisableWebEdit = true })</title>
@Html.Sitecore().VisitorIdentification()

<!-- Core CSS - Include with every page -->
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<link href="~/Assets/css/reset.css" rel="stylesheet" />
<link href="~/Assets/css/common.css" rel="stylesheet" />

<!-- Custom styles for this template -->
<link href="~/Assets/css/main.css" rel="stylesheet" />

And js files

<!-- Core Scripts - Include with every page -->
<script src="~/Scripts/modernizr-2.6.2.js"></script>
<script src="~/Scripts/jquery-3.1.1.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>

<!-- Core Scripts - Include with every page -->
<script src="~/Scripts/respond.min.js"></script>

<!-- Core Scripts - Include with every page -->
<script src="~/Assets/scripts/common.js"></script>
<script src="~/Assets/scripts/jquery.easing.1.3.js"></script>

<!-- Custom styles for this template -->
<script src="~/Assets/scripts/index.js"></script>
<script type="text/javascript">jQuery.noConflict(true);</script>

P/s: I cannot use tag Sitecore (Sitecore MVC 4, Sitecore 8.2)

Community
  • 1
  • 1
Long Ngan
  • 1
  • 4

1 Answers1

0

View the output page source and the network stack using Chrome dev tools, make sure jQuery is being loaded before other jquery files.

M T
  • 136
  • 1
  • 8
  • I tried and I did not thinks it was the core problem. Maybe something occured in CSS files because Chrome dev tools warned that ReferenceError: jQuery is not defined in ThumbCarousel.js – Long Ngan Oct 20 '16 at 03:59