1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 03:32:47 +08:00
2021-06-01 12:44:15 +08:00

36 lines
1.1 KiB
JavaScript

layui.use(['jquery', 'helper'], function () {
var $ = layui.jquery;
var helper = layui.helper;
if ($('#tab-courses').length > 0) {
var $tabCourses = $('#tab-courses');
helper.ajaxLoadHtml($tabCourses.data('url'), $tabCourses.attr('id'));
}
if ($('#tab-articles').length > 0) {
var $tabArticles = $('#tab-articles');
helper.ajaxLoadHtml($tabArticles.data('url'), $tabArticles.attr('id'));
}
if ($('#tab-questions').length > 0) {
var $tabQuestions = $('#tab-questions');
helper.ajaxLoadHtml($tabQuestions.data('url'), $tabQuestions.attr('id'));
}
if ($('#tab-answers').length > 0) {
var $tabAnswers = $('#tab-answers');
helper.ajaxLoadHtml($tabAnswers.data('url'), $tabAnswers.attr('id'));
}
if ($('#tab-friends').length > 0) {
var $tabFriends = $('#tab-friends');
helper.ajaxLoadHtml($tabFriends.data('url'), $tabFriends.attr('id'));
}
if ($('#tab-groups').length > 0) {
var $tabGroups = $('#tab-groups');
helper.ajaxLoadHtml($tabGroups.data('url'), $tabGroups.attr('id'));
}
});