온라인
상담
전화상담
';
},
},
on: {
init: function () {
$('.slide-video .space-swiper-pn-num').html('
1 / ' + itemSwiperNum);
$('.slide-video .space-swiper-pn>i').css('width', 1 / itemSwiperNum * 100 + '%');
},
slideChange: function () {
$('.slide-video .space-swiper-pn-num b').html(this.realIndex + 1);
$('.slide-video .space-swiper-pn>i').css('width', (this.realIndex + 1) / itemSwiperNum * 100 + '%');
},
},
breakpoints: {
991: {
slidesPerView: 1.2,
spaceBetween: 20,
},
}
});
function popupyoutube() {
$.each($('.link-video'), function (index, item) {
$(item).magnificPopup({
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: true,
closeMarkup: '
',
iframe: {
patterns: {
youtube_short: {
index: 'youtu.be/',
id: 'youtu.be/',
src: '//www.youtube.com/embed/%id%?autoplay=1'
}
}
}
});
});
}
$(document).ready(function () {
popupyoutube();
$(window).on("scroll", function () {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ($(window).width() <= 1024) {
if ((scrollHeight - scrollPosition - 500) <= 0) {
getMovie((now_page + 1), now_order, 0);
}
if ($(window).scrollTop() > $(".sect-story").offset().top) {
$(".btn-top").addClass('fadein');
} else {
$(".btn-top").removeClass('fadein');
}
if (now_page == 22 && scrollPosition >= $("#ft").offset().top) {
$(".btn-top").css('position', 'absolute').css('bottom', '100%');
} else {
$(".btn-top").css('position', '').css('bottom', '');
}
}
});
var isSearch = '';
if (isSearch) {
var scrollTop;
if ($(window).width() <= 1024) {
scrollTop = $(".form-srch").offset().top - 60;
} else {
scrollTop = $(".form-srch").offset().top - 122;
}
$('html').animate({
scrollTop: scrollTop
}, 400);
}
})
var now_page = 6;
var now_order = 0;
var save_keyword = "";
var search_param = "";
var wv_loading = false;
var m_wv_loading = false;
function getMovie(page, order, opt) {
if (!wv_loading) {
if ($(window).width() <= 1024 && now_page >= 22) {
return false;
}
wv_loading = true;
$.ajax({
url: '/api/story/getMovie',
type: 'get',
data: {page: page, order: order, keyword: "", category: 7},
success: function (data) {
if (data.status == 'error') {
alert(data.msg);
save_keyword = "";
$("#keyword").val("");
return;
}
now_page = page;
now_order = order;
if (typeof (history.pushState) == 'function') {
var renewURL = location.href; // 현재 주소
if (renewURL.indexOf('?page') != -1) {
renewURL = renewURL.replace(/\?page=([0-9]+)/ig, '?page=' + now_page); // 정규식으로 ?page 부분 대체
} else if (renewURL.indexOf('&page') != -1) {
renewURL = renewURL.replace(/\&page=([0-9]+)/ig, '&page=' + now_page); // 정규식으로 &page 부분 대체
} else {
if (renewURL.indexOf('?') != -1) {
renewURL = renewURL.replace(/\?/ig, '?page=' + now_page + '&'); // 정규식으로 ?page 부분 대체
} else {
renewURL += '?page=' + now_page; // 새로운 페이지 번호를 할당
}
}
if (renewURL.indexOf('&search') != -1) {
search_param += "&search=";
}
if (renewURL.indexOf('&order') != -1) {
search_param += "&order=0";
}
history.pushState(null, null, renewURL); // 페이지 정보 갱신
}
$(".pn").empty();
var start = (parseInt((now_page - 1) / 10)) * 10 + 1; // 페이지네이션 시작 번호
var end = (parseInt((now_page - 1) / 10) + 1) * 10; // 페이지네이션 끝 번호
var first_html; // 처음으로 버튼 html
var prev_html; // 이전 버튼 html
var page_html = ""; // 숫자 버튼 html
var next_html; // 다음 버튼 html
var last_html; // 끝으로 버튼 html
if (now_page < 6) { // 현재 페이지가 6 이전이면 처음과 이전 버튼 비활성화
first_html = '
처음 ';
prev_html = '
이전 ';
} else { // 6 이상이면 링크 생성
if (search_param != "") {
first_html = '
처음 ';
prev_html = '
이전 ';
} else {
first_html = '
처음 ';
prev_html = '
이전 ';
}
}
$(".pn").append(first_html);
$(".pn").append(prev_html);
if (end > 22) { // 만약 끝 번호가 총 페이지수보다 크다면 끝번호를 총 페이지수로 맞춰준다.
end = 22;
}
for (var j = start; j <= end; j++) {
var parameter = '';
if (search_param != "") {
parameter = '?page=' + j + search_param;
} else {
parameter = '?page=' + j;
}
if (j == now_page) { // 현재 페이지일 경우에는 active 태그 추가
page_html += "
34100년을 향한 도전 ";
} else {
page_html += "
34100년을 향한 도전 ";
}
}
$(".pn").append(page_html);
if (now_page == 22) {
next_html = '
다음 ';
last_html = '
마지막 ';
} else {
if (search_param != "") {
next_html = '
다음 ';
last_html = '
마지막 ';
} else {
next_html = '
다음 ';
last_html = '
마지막 ';
}
}
$(".pn").append(next_html);
$(".pn").append(last_html);
$(".video-list .pc-content").empty();
for (var i = 0; i < data.movies.length; i++) {
var item = data.movies[i];
var html =
'
' +
'' +
'
' +
' ' +
'' +
'
' + item.title + ' ' +
'
' + item.category + ' 6검색 ' + item.date + '
' +
'
' +
' ';
$(".pc-content").append(html);
$(".mo-content").append(html);
}
wv_loading = false;
},
error: function (error) {
alert('게시물 목록을 가져오지 못했습니다.');
}
});
}
}
$('.nav-link').on('click', function (e) {
$('.nav-link').removeClass('active');
$(this).addClass('active');
var order = $(this).data('order');
history.replaceState({}, null, location.pathname);
if (typeof (history.pushState) == 'function') {
var renewURL = location.href; // 현재 주소
if (order) {
renewURL += "?order=" + order;
}
if ($("#keyword").val()) {
if (order) {
renewURL += "&search=" + $("#keyword").val();
} else {
renewURL += "?search=" + $("#keyword").val();
}
}
history.pushState(null, null, renewURL); // 페이지 정보 갱신
}
})
$('.form-srch button').on('click', function (e) {
$('.nav-link').removeClass('active');
$('.nav-link').eq(0).addClass('active');
history.replaceState({}, null, location.pathname);
var renewURL = location.href;
renewURL += "?search=" + $("#keyword").val();
history.pushState(null, null, renewURL);
});
$('#keyword').on('keydown', function (e) {
if (e.keyCode == 13) {
getMovie(1, 0, 'search');
}
})
본사/대구캠퍼스
대구광역시 달성군 논공읍 논공중앙로34길 35 3[FM무료 토토 사이트] 2024년 첫 번째 뉴스 PICK 📻
서울캠퍼스
서울특별시 서초구 남부순환로 2493 Tel : 02-3470-7300
공동대표이사 : 김준식, 원유현
사업자등록번호 : 514-81-06690
Copyright © 2020 daedong all rights reserved
4IR 정보