Tôi đang cố gắng triển khai các tab jQuery để thay thế vùng chứa tab AJAX. Tôi đã theo mã từ jquery website nhưng các tab của tôi không hiển thị. Nó chỉ tải toàn bộ trang dữ liệu không có tab. Và firebug nói với tôi những lỗi sau:Các tab jQuery không hoạt động
$("#tabs").tabs is not a function
$("#tabs").tabs();
Tôi đã có tài liệu tham khảo cho tất cả các file cần thiết:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
Và tôi đã nhận được chức năng được chỉ định như sau:
<script type="text/javascript">
$(document).ready(function() {
$("#tabs").tabs();
});
</script>
Mã cho các tab như sau:
div id="tabs">
<ul>
<li><a href="#tab-1"><span>Patient Information</span></a></li>
<li><a href="#tab-2"><span>Medical History 1 of 3</span></a></li>
<li><a href="#tab-3"><span>Medical History 2 of 3</span></a></li>
<li><a href="#tab-4"><span>Medical History 3 of 3</span></a></li>
<li><a href="#tab-5"><span>Scheduler</span></a></li>
<li><a href="#tab-6"><span>Care Plan</span></a></li>
</ul>
<div id="tab-1">
</div>
**Repeats for all tabs through tab-6**
</div>
bất cứ ai có thể cho tôi biết những gì tôi đang làm sai? Vì hàm .tabs() không hoạt động, trang chỉ tải như vậy -
Nghe có vẻ như jquery UI được không tải. Đảm bảo tệp js thực sự đang tải. Kiểm tra tab net firebug nếu bạn có firebug (mà bạn nên). – SoWeLie