diff --git a/src/main/webapp/visitEdu/usr/publish/script/content.js b/src/main/webapp/visitEdu/usr/publish/script/content.js index 699059fe..0a34c36a 100644 --- a/src/main/webapp/visitEdu/usr/publish/script/content.js +++ b/src/main/webapp/visitEdu/usr/publish/script/content.js @@ -1,23 +1,25 @@ - $(window).on("load",function () { - - //체크박스,라디오버튼 disabled 시 스크린리더가 건너뛰기때문에 태그 추가하여 읽게 만듦 20220503 - $("input[type='checkbox'],input[type='radio']").each(function(){ +$(window).on("load", function () { + + //체크박스,라디오버튼 disabled 시 스크린리더가 건너뛰기때문에 태그 추가하여 읽게 만듦 20220503 + $("input[type='checkbox'],input[type='radio']").each(function () { var chxDisabled = $(this).prop("disabled"); - if (chxDisabled == true){ + if (chxDisabled == true) { var chxLabel = $(this).next("label").text(); var chxChecked = $(this).prop("checked"); - if(chxChecked == true){ - $(this).next("label").after(""+chxLabel+' 체크됨'+""); - } else {$(this).next("label").after(""+chxLabel+"");} + if (chxChecked == true) { + $(this).next("label").after("" + chxLabel + ' 체크됨' + ""); + } else { + $(this).next("label").after("" + chxLabel + ""); + } } else {} }); - - $(".duet-date__toggle").attr("title","달력 열림"); - }); - + + $(".duet-date__toggle").attr("title", "달력 열림"); +}); + $(document).ready(function () { - + //강사유형 선택 $(".sel_tpye ul li").mouseenter(function () { $(this).addClass("on"); @@ -33,7 +35,7 @@ $(document).ready(function () { $(".sel_tpye ul li").focusout(function () { $(this).removeClass("on"); }); - + //시간 설정 팝업 $(".time_set_btn").click(function () { $(this).next($(".time_layer")).addClass("on"); @@ -55,104 +57,105 @@ $(document).ready(function () { timeInput(); $('.yearSelect').yearselect({ - start : 1970, - end : 2050, + start: 1970, + end: 2050, selected: new Date().getFullYear(), - order:'desc' + order: 'desc' }); // 생년월일 select box birthSelectBoxDraw(); - - $('.popup_wrap input[type="text"], .popup_wrap input[type="number"], .popup_wrap input[type="tel"]').keydown(function(){ - if(event.keyCode === 13){ + + $('.popup_wrap input[type="text"], .popup_wrap input[type="number"], .popup_wrap input[type="tel"]').keydown(function () { + if (event.keyCode === 13) { event.preventDefault(); } }); - - $(".tab_li.on .tab_button").attr("title","선택됨"); - + + $(".tab_li.on .tab_button").attr("title", "선택됨"); + // tab 클릭시 - $('.tab_button').on('click',function(){ + $('.tab_button').on('click', function () { var tabNum = $(this).closest(".tab_li").index(); $(this).closest(".tab_li").addClass("on").siblings(".tab_li").removeClass("on"); - $(this).attr("title","선택됨"); + $(this).attr("title", "선택됨"); $('.tab_content').eq(tabNum).addClass("on").siblings('.tab_content').removeClass('on'); $(this).closest(".tab_li").siblings(".tab_li").find(".tab_button").removeAttr("title"); }); - - + + }) -function birthSelectBoxDraw(){ +function birthSelectBoxDraw() { $('.birthYear').yearselect({ - start : 1900, - end : new Date().getFullYear(), + start: 1900, + end: new Date().getFullYear(), emptyOption: true, emptyText: '선택', - selected:'', - order:'desc' + selected: '', + order: 'desc' }) // 년도를 바꾼다면 일자를 다시 선택하기 - $('.birthYear').change(function(){ - if($(this).next().next().next().next('select.birthDay')){ - if(Number($(this).next().next().next().next('select.birthDay').val()) > 28){ + $('.birthYear').change(function () { + if ($(this).next().next().next().next('select.birthDay')) { + if (Number($(this).next().next().next().next('select.birthDay').val()) > 28) { dayDraw($(this).next().next().next().next('select.birthDay')); } } }); - $.each($(".birthMonth"), function(idx, elm){ + $.each($(".birthMonth"), function (idx, elm) { var selectValue = $(this).attr('selectValue'); $(this).append($('