loading spinner markup css example https://tobiasahlin.com/spinkit/ SpinKit Simple CSS Spinners tobiasahlin.com 응용 WEB/CSS 5년 전
JSTL ${param} 랜딩 파라미터에 따른 슬라이드 이동 var num = "${param.num }"; var startSlide = 0; if(num != "") { startSlide = Number(num) - 1; } bxSlider = $('.contentTip-slider').bxSlider(); bxSlider.goToSlide(startSlide); - 자바스크립트 쿼리스트링으로 주소값 가져오는 방법도 있다. function getUrlParams() { var params = {}; window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str, key, value) { params[key] = value; }); return params; } 출처 https://gent.tis.. WEB/Javascript 5년 전
슬라이드 토글시 단순 텍스트 비교말고 attr 이용 $(".content-bar").click(function () { $(".content-bottom").slideToggle(600); var text = "이전 컨텐츠 더보기 "; if($(this).attr("openMoreCotent") == undefined) { text += "▲"; $(this).attr("openMoreCotent", "open"); } else { text += "▼"; $(this).removeAttr("openMoreCotent"); } $(this).text(text); }); WEB/jQuery 5년 전
Input 휴대폰번호 hypen (-) 자동으로 넣어주기 $("input[type=text]").keydown(function(event){ var key = event.charCode || event.keyCode || 0; $text = $(this); if (key !== 8 && key !== 9) { if ($text.val().length === 3) { $text.val($text.val() + '-'); } if ($text.val().length === 8) { $text.val($text.val() + '-'); } } return (key == 8 || key == 9 || key == 46 || (key >= 48 && key = 96 && key WEB/jQuery 5년 전