본문 바로가기

분류 전체보기216

nav 반응형 소스 $(window).resize(function() { $("#header").on("mouseleave focusout", function(){ if($(window).width() > 1024) { $(".h-nav .nav-down").stop().slideUp(500); } }); if($(window).width() > 1024) { $("html, body").removeAttr('style'); $(".h-menu .menu-close").hide(); $(".h-menu .menu-open").show(); $(".h-top").find(".search-bt").removeClass("right"); $(".nav-2depth .nav-menu").each(function(){ if($(th.. 2020. 4. 10.
[bootstrap] multiple selected 선택 n개 이상일 때, 전체일 때 // add ellipsis if (selectedItems.length > 2) title += '...'; // if all options selected if (selectedItems.length == $selectOptions.length) title = '전체'; 2020. 4. 8.
[bootstrap] Switch change event $('.js-switch-small').on('change.bootstrapSwitch', function(e) { (e.target.checked) ? $(this).siblings('.switch-toggle').show() : $(this).siblings('.switch-toggle').hide(); //console.log(e.target.checked); }); 2020. 4. 7.
모바일 nav에서 하위 메뉴가 있을 때 링크 제거하기 $(".nav-2depth .nav-menu").each(function(){ if($(this).find(".nav-3depth").length>0){ var depth2_tit = $(this).find(".nav-tit a").text(); $(this).find(".nav-tit").find("a").hide(); $(this).find(".nav-tit").append('' + depth2_tit +''); } }); 2020. 4. 6.
모바일 nav에서 html, body height 100%로 하기 $(".h-menu .menu-open").on("click", function(){ $("html, body").css({"height":"100%","overflow":"hidden"}); $(this).hide(); $(".h-menu .menu-close").show(); $(".h-nav .nav-down").stop().show(); }); $(".h-menu .menu-close").on("click", function(){ $("html, body").removeAttr('style'); $(this).hide(); $(".h-menu .menu-open").show(); $(".h-nav .nav-down").stop().hide(); }); 2020. 4. 6.
[swiper.js] prev, next controls navigation: { prevEl: '.familySlide .slide-controls .prev', nextEl: '.familySlide .slide-controls .next', } familySlide_pause.on("click",function(){ familySlide.autoplay.stop(); $(this).hide(); familySlide_play.show(); }); familySlide_play.on("click",function(){ familySlide.autoplay.start(); $(this).hide(); familySlide_pause.show(); }); 2020. 4. 6.
[slick.js] prev, next controls prevArrow: $('.familySlide .slide-controls .prev'), nextArrow: $('.familySlide .slide-controls .next') familySlide_pause.on("click",function(){ $(".familySlide .slider").slick("slickPause"); $(this).hide(); familySlide_play.show(); }); familySlide_play.on("click",function(){ $(".familySlide .slider").slick("slickPlay"); $(this).hide(); familySlide_pause.show(); }); 2020. 4. 6.
[bxslider.js] 슬라이드 한 개일때 pager 없애기 $('.img-slider > ul').each(function(){ $(this).bxSlider({ auto: false, pager: ($(this).find("li").length > 1) ? true: false, controls: false, touchEnabled: false, infiniteLoop: false }); }); 2020. 4. 6.
[bxslider.js] auto일 때 prev, next 기능과 안겹치게 하기 $('.photo .prev, .photo .next').on("click",function(){ mySlider.stopAuto(); mySlider.delay(4000).startAuto(); }); 2020. 4. 6.