diff --git a/VamPa/src/main/webapp/WEB-INF/views/search.jsp b/VamPa/src/main/webapp/WEB-INF/views/search.jsp index 10e6bbd..39629c7 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/search.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/search.jsp @@ -98,20 +98,18 @@
- 테스트용1 - 테스트용2 - 테스트용3 - 테스트용4 - 테스트용5 - 테스트용6 + + + ${filter.cateName}(${filter.cateCount}) + +
- 테스트용1 - 테스트용2 - 테스트용3 - 테스트용4 - 테스트용5 - 테스트용6 + + + ${filter.cateName}(${filter.cateCount}) + +
@@ -312,6 +310,26 @@ buttonA.attr("class", "filter_button"); }); + /* 필터링 태그 동작 */ + $(".filter_content a").on("click", function(e){ + e.preventDefault(); + + let type = ''; + if(type === 'A' || type === 'T'){ + type = type + 'C'; + } + let keyword = ''; + let cateCode= $(this).attr("href"); + + $("#filter_form input[name='keyword']").val(keyword); + $("#filter_form input[name='cateCode']").val(cateCode); + $("#filter_form input[name='type']").val(type); + $("#filter_form").submit(); + + }); + + + $(document).ready(function(){ // 검색 타입 selected diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/search.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/search.jsp index 064b9d5..0962ec5 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/views/search.jsp +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/search.jsp @@ -98,20 +98,18 @@ @@ -120,7 +118,7 @@ - +
@@ -310,6 +308,24 @@ buttonA.attr("class", "filter_button"); }); + /* 필터링 태그 동작 */ + $(".filter_content a").on("click", function(e){ + e.preventDefault(); + + let type = ''; + if(type === 'A' || type === 'T'){ + type = type + 'C'; + } + let keyword = ''; + let cateCode= $(this).attr("href"); + + $("#filter_form input[name='keyword']").val(keyword); + $("#filter_form input[name='cateCode']").val(cateCode); + $("#filter_form input[name='type']").val(type); + $("#filter_form").submit(); + + }); + $(document).ready(function(){