I get the following JavaScript errors when using jQuery vsdoc with VS 2010. The Errors go away if I remove the vsdoc.js line.
I tried to add var rootjQuery = jQuery(document); but some new errors pops up. I don’t want to keep patching that way.
Line: 68
Error: 'rootjQuery' is undefined
Line: 8
Error: Object doesn't support this property or method
<head>
<title>Index</title>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1-vsdoc.js"></script>
<script type="text/javascript">
$(document).ready(function () {
});
</script>
</head>
SOLVED
I found the answer. Just swap the order of jquery and vsdoc script tag.
<head>
<title>Index</title>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1-vsdoc.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.js"></script>
<script type="text/javascript">
$(document).ready(function () {
});
</script>
</head>
changing the order stopped the javascript errors
and it did not work with any part of T4MVC
so I did this
but I only seem to get Intellisense for javascript written on the page (not in my
src=files)EDIT:
based on MSDN
found out how to get the intelli-sense in stand-alone files
Also drag and drop from the solution explorer into the
.jsfile worked!