jquery - Getting a JS error when publishing site -
getting a: error: referenceerror: $ not defined
when publish website. though have jquery lib added in layout page, , on partialview complains not finding jquery lib how reference it:
<script src="~/scripts/jquery-1.10.2.min.js"></script>
when run website locally, works fine, no js errors, published, starts complaining. add code question, not sure code add. want know if there difference in how js files loaded when site published, when running locally. has experienced such errors?
on 2nd thoughts, i'll try add code anyway. code complains this: (and in partialview)
<script type="text/javascript"> $(document).ready(function () { $('#slider').rhinoslider(); $("#sliderholderqitoz").toggle("fade", 6000); }); </script>
my layout looks this:
<html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@viewbag.title</title> @styles.render("~/content/css") @scripts.render("~/bundles/modernizr") <script src="~/scripts/jquery-1.10.2.min.js"></script> <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <link href="~/content/rhinoslider-1.05.css" rel="stylesheet" /> <link href="~/scripts/jquery-ui.min.css" rel="stylesheet" /> <script src="~/scripts/jquery-ui.min.js"></script> <script src="~/scripts/jquery.unobtrusive-ajax.js"></script> <script src="~/scripts/jquery.unobtrusive-ajax.min.js"></script> <script src="~/scripts/ownedscripts/initializeui.js"></script> <script src="~/scripts/ownedscripts/dialogs.js"></script> <script src="~/scripts/ownedscripts/misc.js"></script> <script src="~/scripts/extrascripts/rhinoslider-1.05.min.js"></script> <script src="~/scripts/extrascripts/rhinoslider-1.05.js"></script> <script src="~/scripts/extrascripts/mousewheel.js"></script> <script src="~/scripts/extrascripts/easing.js"></script>
again, when running/debuggin locally, good, error comes after publishing
did try check "real" path manually? on opinion have different relative path local , on server.
try substitute standard html script check localy , on server.
Comments
Post a Comment