我在控制台中有这个错误:
TypeError: $(...).tab is not a function
at fire (jquery-1.7.1.js:1046)
at Object.fireWith (jquery-1.7.1.js:1164)
at Function.ready (jquery-1.7.1.js:435)
at HTMLDocument.DOMContentLoaded (jquery-1.7.1.js:923)
我的jQuery代码是:
<script type="text/javascript">
$(document).ready(function () {
$(function () {
var tabName =
$("[id*=TabName]").val() != "" ?
$("[id*=TabName]").val() :
"employment";
$('#Tabs a[href="#' + tabName + '"]').tab('show');
$("#Tabs a").click(function () {
$("[id*=TabName]").val($(this).attr("href").replace("#", "")); });
});
});
</script>
它的HTML代码是:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link rel="stylesheet" type="text/css" href="app-assets/vendors/css/tables/datatable/datatables.min.css"/>