Commit a654a1a3 by o.kimura

FAQ検索をSPでも表示

parent 44d200ec
$(function(){$(".p-faq-Q").on("click",function(){$(this).next().slideToggle(),$(this).toggleClass("active")});var e=$(".content"),t=$(".search__input").find("input[type=text]"),n=e.find("h4"),i=$(),a=[];n.each(function(){a.push($(this).text().replace(/\s{2,}/g," ").toLowerCase())}),t.on("keyup",function(){n.each(function(){i=$(this),i.html(i.html().replace(/<span class="highlight">([^<]+)<\/span>/gi,"$1"))});var s=$.trim(t.val()).toLowerCase();if(s.length)for(var o in a)if(i=n.eq(o),-1!=a[o].indexOf(s))i.html(i.html().replace(new RegExp(s+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')),i.parent().parent().css("display","block");else{i.parent().parent().css("display","none");var l=$("#sect1 .p-faq-Box").filter(":visible").length,f=$("#sect2 .p-faq-Box").filter(":visible").length,r=$("#sect3 .p-faq-Box").filter(":visible").length,c=$("#sect4 .p-faq-Box").filter(":visible").length,h=$("#sect5 .p-faq-Box").filter(":visible").length,d=$("#sect6 .p-faq-Box").filter(":visible").length;0==l?$("#faq-01").css("display","none"):$("#faq-01").css("display","block"),0==f?$("#faq-02").css("display","none"):$("#faq-02").css("display","block"),0==r?$("#faq-03").css("display","none"):$("#faq-03").css("display","block"),0==c?$("#faq-04").css("display","none"):$("#faq-04").css("display","block"),0==h?$("#faq-05").css("display","none"):$("#faq-05").css("display","block"),0==d?$("#faq-06").css("display","none"):$("#faq-06").css("display","block"),0==l&&0==f&&0==r&&0==c&&0==h&&0==d?$(".faq-notfound").css("display","block"):$(".faq-notfound").css("display","none")}else n.parent().parent().css("display","block"),$("#faq-01").css("display","block"),$("#faq-02").css("display","block"),$("#faq-03").css("display","block"),$("#faq-04").css("display","block"),$("#faq-05").css("display","block"),$("#faq-06").css("display","block")})});
\ No newline at end of file
$(function(){$(".p-faq-Q").on("click",function(){$(this).next().slideToggle(),$(this).toggleClass("active")});var s=$(".content"),a=$(".search__input").find("input[type=text]"),e=s.find("h4"),l=$(),i=[];e.each(function(){i.push($(this).text().replace(/\s{2,}/g," ").toLowerCase())}),a.on("keyup",function(){e.each(function(){l=$(this),l.html(l.html().replace(/<span class="highlight">([^<]+)<\/span>/gi,"$1"))});var c=$.trim(a.val()).toLowerCase();if(c.length)for(var n in i)if(l=e.eq(n),-1!=i[n].indexOf(c))l.html(l.html().replace(new RegExp(c+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')),l.parent().parent().css("display","block");else{l.parent().parent().css("display","none");var t=$("#sect1 .p-faq-Box").filter(":visible").length,f=$("#sect2 .p-faq-Box").filter(":visible").length,p=$("#sect3 .p-faq-Box").filter(":visible").length,o=$("#sect4 .p-faq-Box").filter(":visible").length,r=$("#sect5 .p-faq-Box").filter(":visible").length,d=$("#sect6 .p-faq-Box").filter(":visible").length;0==t?$("#faq-01").css("display","none"):$("#faq-01").css("display","block"),0==f?$("#faq-02").css("display","none"):$("#faq-02").css("display","block"),0==p?$("#faq-03").css("display","none"):$("#faq-03").css("display","block"),0==o?$("#faq-04").css("display","none"):$("#faq-04").css("display","block"),0==r?$("#faq-05").css("display","none"):$("#faq-05").css("display","block"),0==d?$("#faq-06").css("display","none"):$("#faq-06").css("display","block"),0==t&&0==f&&0==p&&0==o&&0==r&&0==d?$(".faq-notfound").css("display","block"):$(".faq-notfound").css("display","none")}else e.parent().parent().css("display","block"),$("#faq-01").css("display","block"),$("#faq-02").css("display","block"),$("#faq-03").css("display","block"),$("#faq-04").css("display","block"),$("#faq-05").css("display","block"),$("#faq-06").css("display","block")})});
\ No newline at end of file
......@@ -1830,3 +1830,10 @@ other.css
margin-bottom: 12px;
text-align: center;
}
@media screen and (max-width: 767px) {
.p-faq .faq-notfound {
display: none;
font-size: 1.6rem;
}
}
......@@ -751,6 +751,13 @@ body {
border-bottom: 2px solid #dbdbdb;
}
@media screen and (max-width: 767px) {
.side {
width: 100%;
border: none;
}
}
.side__mainttl {
background: #212121;
font-size: 1.8rem;
......@@ -816,6 +823,7 @@ body {
float: none;
}
}
/*
.c-breadcrumb {
background: transparent;
......@@ -1538,30 +1546,29 @@ body {
transform: translateY(-50%) rotate(45deg);
}
.p-course .p-atc-mv {
background-image: url(/common_previous/img/img_hero_rt_pc.jpg);
}
.p-course .p-atc-mv {
background-image: url(/common_previous/img/img_hero_rt_pc.jpg);
}
.p-course .p-atc7-list2 {
margin-top: 10px;
font-family: heisei-kaku-gothic-std, sans-serif;
font-size: 1.3rem;
line-height: 1.8rem;
}
.p-course .p-atc7-list2 {
margin-top: 10px;
font-family: heisei-kaku-gothic-std, sans-serif;
font-size: 1.3rem;
line-height: 1.8rem;
}
.p-course .p-atc7-list2>li {
margin-bottom: 0;
}
.p-course .p-atc7-list2 > li {
margin-bottom: 0;
}
.p-course .p-atc7-list2>li:before {
top: 6px;
}
.p-course .p-atc7-list2 > li:before {
top: 6px;
}
.p-cpsp .p-atc-mv {
background-image: url(/common_previous/img/img_penetration_cpsp_mv.png);
}
background-image: url(/common_previous/img/img_penetration_cpsp_mv.png);
}
.p-bwms .p-atc-mv {
background-image: url(/assets/img/service/management/img_penetration_bwms_mv.png);
}
background-image: url(/assets/img/service/management/img_penetration_bwms_mv.png);
}
......@@ -37,7 +37,7 @@
<div class="container">
<aside class="side pc-only">
<aside class="side">
<div class="side__box">
<div class="search">
......@@ -48,7 +48,7 @@
</form>
</div>
<ul class="side__list">
<ul class="side__list pc-only">
<li class="side__item">
<a class="side__txt" href="#faq-01">セミナーについて</a>
</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment