온라인
상담
전화상담
';
},
},
on: {
init: function () {
$('.slide-video .space-swiper-pn-num').html('
1 / ' + videoSwiperNum);
$('.slide-video .space-swiper-pn>i').css('width', 1 / videoSwiperNum * 100 + '%');
},
// 마지막 슬라이드 문제로 이벤트 변경
transitionEnd: function () {
$('.slide-video .space-swiper-pn-num b').html(this.snapIndex + 1);
$('.slide-video .space-swiper-pn>i').css('width', (this.snapIndex + 1) / videoSwiperNum * 100 + '%');
},
}
});
$(".nav-pills li").on("click", function (e) {
var target = $(this).data('idx');
$(".nav-pills li a").removeClass('active');
$(this).find('a').addClass('active');
$(".dropdown-area").show();
if (target == 0) {
getAllproductlist(1, 99, 1);
} else if (target == 6) {
$(".dropdown-area").hide();
getMsdsList();
} else {
getproductlist(target, 1, '');
}
if (target == 0) {
$('.sect-catalog').show();
} else {
$('.sect-catalog').hide();
$('.sect-catalog').eq(target - 1).show();
}
});
function getMsdsList() {
$.ajax({
url: '/api/story/getMsdsList',
type: 'get',
success: function (response) {
console.log(response);
}
});
}
function getproductlist(ctgr, oj, showme) {
$.ajax({
url: '/api/story/getCategoryList',
type: 'get',
data: {category: ctgr, sel: oj},
success: function (response) {
if (oj == 1) {
$('.category-series').empty();
var obj = 'category-series';
} else {
$('.category-model').empty();
$('.category-model').prev().text(response.item[0].product_name);
var obj = 'category-model';
}
for (var i = 0; i < response.item.length; i++) {
if (response.item[i].product_id == 0) {
$(".sect-story .dropdown-toggle").text(response.item[i].product_name);
}
if (i == 0) {
$('.' + obj).append('
사용자설명서·토토 사이트');
$('.' + obj).append('
' + response.item[i].product_name + '');
} else {
$('.' + obj).append('
' + response.item[i].product_name + '');
}
}
if (oj == 1) {
getproductlist(response.item[0].product_id, 2);
}
}
});
}
function getAllproductlist(ctgr, oj, opt) {
$.ajax({
url: '/api/story/getCategoryList',
type: 'get',
data: {category: ctgr, sel: oj},
success: function (response) {
if (opt == 1) {
$('.category-series').empty();
}
var obj = 'category-series';
for (var i = 0; i < response.item.length; i++) {
if (response.item[i].product_id == 0) {
$(".sect-story .dropdown-toggle").text(response.item[i].product_name);
}
if (i == 0) {
if (opt == 1) {
$('.' + obj).append('
사용자설명서·토토 사이트');
}
$('.' + obj).append('
' + response.item[i].product_name + '');
} else {
$('.' + obj).append('
' + response.item[i].product_name + '');
}
}
}
});
}
$(document).ready(function () {
getAllproductlist(1, 99, 1);
var isSearch = '';
if (isSearch) {
var scrollTop;
if ($(window).width() <= 1024) {
scrollTop = $(".form-srch").offset().top - 108;
} else {
scrollTop = $(".form-srch").offset().top - 193;
}
$('html').animate({
scrollTop: scrollTop
}, 400);
}
})
$(window).on("scroll", function () {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ($(window).width() <= 1024) {
if ($(window).scrollTop() > $(".sect-story").offset().top) {
$(".btn-top").addClass('fadein');
} else {
$(".btn-top").removeClass('fadein');
}
if (scrollPosition >= $("#ft").offset().top) {
$(".btn-top").css('position', 'absolute').css('bottom', '100%');
} else {
$(".btn-top").css('position', '').css('bottom', '');
}
}
});