I have a standard .NET 4.5 Webforms application. However as soon as I include the jqBootstrapValidation from http://reactiveraven.github.io/jqBootstrapValidation/ I get the error:
jqBootstrapValidation is not a function
in the Firebug console. How do I track this down? I include the relevant sections of my site master:
<head runat="server">
<meta charset="utf-8" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"> </script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"> </script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"> </script>
<script src="//raw.github.com/ReactiveRaven/jqBootstrapValidation/1.3.6/jqBootstrapValidation.js"></script>
</head>
<body data-spy="scroll" data-target="#NavbarLeft">
<form novalidate class="form-horizontal" runat="server">
<asp:ScriptManager runat="server" EnablePageMethods="True" EnableCdn="True">
<Scripts>
<%--Framework Scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
and then before the closing body tag:
</form>
<%--//Comment this in once we can work out why it wont compile--%>
<script>
$(function () {
$("input,select,textarea").not("[type=submit]").jqBootstrapValidation();
});
</script>
</body>
</html>
Below is the relevant code from App_Start registering the bundles....
public class BundleConfig
{
public static void RegisterBundles(BundleCollection aBundles)
{
aBundles.Add(new ScriptBundle("~/Bundles/WebFormsJs").Include(
"~/Scripts/WebForms/WebForms.js",
"~/Scripts/WebForms/WebUIValidation.js",
"~/Scripts/WebForms/MenuStandards.js",
"~/Scripts/WebForms/Focus.js",
"~/Scripts/WebForms/GridView.js",
"~/Scripts/WebForms/DetailsView.js",
"~/Scripts/WebForms/TreeView.js",
"~/Scripts/WebForms/WebParts.js"));
aBundles.Add(new ScriptBundle("~/Bundles/MsAjaxJs").Include(
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));
// Use the Development version of Modernizr to develop with and learn from. Then, when you’re
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need
aBundles.Add(new ScriptBundle("~/Bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
}
}
What am I missing here and how do I fix it? Diagnose these kinds of "not a function" issues.
It seems the error disappears if I don't have any fields protected by http://amanek.com/building-data-annotations-validator-control-with-client-side-validation/
But I still don't see how this would be affecting things as that is using pure JS under the skin.