const navitems = `
首頁
精采課程
立即報名
`;
// {/* 首頁
// 精采課程
// 立即報名 */}
$(function() {
setTimeout(function() {
$('#page-side-nav #topNav ul').html('');
$('#page-side-nav #topNav ul').append($(navitems));
$('#page-side-nav #topNav ul li').show();
}, 1000)
$('input[name="session-register-custom10[]"]').change(function() {
if (($(this).val() == '是') && ($(this).prop('checked'))) {
$('textarea[name="session-register-custom6"]').show();
} else {
$('textarea[name="session-register-custom6"]').hide().val('');
}
}).change();
$('input[name="session-register-custom19[]"]').change(function() {
if (($(this).val() == '其它 ( 請補充說明,惟大會保留調整主題之權力 )') && ($(this).prop('checked'))) {
$('input[name="session-register-custom18"]').show();
} else {
$('input[name="session-register-custom18"]').hide().val('');
}
}).change();
});
function goScroll(target) {
var target_top = $(target).offset().top;
var header_height = $('#nav').height();
var sTop = target_top - header_height;
$("html, body").stop().animate({
scrollTop: sTop
}, 400);
}
$(function() {
location.hash && (function() {
goScroll(location.hash);
}());
$('.goScroll').click(function() {
var target = $(this).attr("href");
goScroll(target);
return false;
});
// var tab_index = 0;
// setInterval(function() {
// tab_index = (tab_index + 1) % 4;
// $('.nav.nav-tabs').find('a').eq(tab_index).click();
// }, 6000);
});
// Speaker
$(".openclose").on('click', function() {
if (!$(this).hasClass('open')) {
$(this).addClass('open')
$(this).html(' - 收合課程介紹');
$(this).parent().find('.openclose_block').slideDown(500);
} else {
$(this).removeClass('open')
$(this).html(' + 展開課程介紹');
$(this).parent().find('.openclose_block').slideUp(500);
}
})