//////////////////////////////////////////////////////////////////////////////////////// //Document Ready //////////////////////////////////////////////////////////////////////////////////////// function execDocReady() { var pluginGroups = [ [ "../reference/light-blue/lib/vendor/jquery.ui.widget.js", "../reference/lightblue4/docs/lib/widgster/widgster.js" ], [ "../reference/lightblue4/docs/lib/bootstrap-select/dist/js/bootstrap-select.min.js", "../reference/jquery-plugins/textillate-0.4.0/assets/animate.css", "../reference/jquery-plugins/textillate-0.4.0/assets/jquery.fittext.js", "../reference/jquery-plugins/textillate-0.4.0/assets/jquery.lettering.js", "../reference/jquery-plugins/textillate-0.4.0/jquery.textillate.js" ] // 추가적인 플러그인 그룹들을 이곳에 추가하면 됩니다. ]; loadPluginGroupsParallelAndSequential(pluginGroups) .then(function () { console.log("모든 플러그인 로드 완료"); $("#sidebar").hide(); $(".wrap").css("margin-left", 0); $("#footer").load("/cover/html/template/landing-footer.html"); setTimeout(function () { $(".widget").widgster(); }, 500); var animatePercentChange = function animatePercentChange (newPercent, elem) { elem = elem || $('.fu-percent span'); const val = parseInt(elem.text(), 10); if(val !== parseInt(newPercent, 10)) { let diff = newPercent < val ? -1 : 1; elem.text(val + diff); setTimeout(animatePercentChange.bind(null, newPercent, elem), 50); } }; $('.fu-progress').on('click', function () { const amount = Math.ceil((Math.random() * 100)); const currentPercent = $('.fu-percent span').text(); const waterAnimSpeed = (Math.abs(currentPercent - amount) / 50) * 10; const waterPercent = 100 - amount; animatePercentChange(amount); $('.water').css({ top : waterPercent + '%' }); }); // 메뉴 클릭 시 active 항목 바꾸기 var menuItems = document.querySelectorAll('#menuList li'); menuItems.forEach(function(item) { item.addEventListener('click', function() { menuItems.forEach(function(li) { li.classList.remove('active'); }); this.classList.add('active'); }); }); }) .catch(function (error) { console.error("플러그인 로드 중 오류 발생"); console.error(error); }); }