오늘 진행한 일정
- PHP 블로그 개선
- 302 방식으로 리디렉션 (구글 봇이 크롤링할 수 있도록)
- article 테이블의 body 부분 longtext로 변경, 이미지 파일도 글 작성 시 넣을 수 있다.
- sitemap 자동생성 및 1시간 간격으로 업데이트
- Jquery 기능을 이용한 탑바 및 사이드바 구현 연습
CSS
- only-child / not only-child
- ~ li.active 안에 자식이 a태그 하나만이 아닌 태그
- ul을 형제로 갖는 것(하위 메뉴가 존재하는 것)을 지목할 수 있다.
.mobile-menu-box-1 ul > li.active > a:not(:only-child) {
color:red;
text-decoration:underline;
}
JavaScript(Jquery)
1) siblings() : siblings는 형제를 가리킨다.
2) find() : find는 후손들을 탐색한다.
function MenuBox__show(){
$('.menu-box-1 ul > li').click(function(){
let $this = $(this);
// 1) siblings()
$this.siblings('.active').find('.active').removeClass('active');
$this.siblings('.active').removeClass('active');
if($this.hasClass('active')){
// 2) find()
$this.find('.active').removeClass('active');
$this.removeClass('active');
}else{
$this.addClass('active');
}
내일 할 일
- Front 구현 시험
- 사이드바 body 부분 제작부터 시작
'Records' 카테고리의 다른 글
2021-07-09 ( JSP ) (0) | 2021.07.09 |
---|---|
2021-07-08 ( JSP ) (0) | 2021.07.08 |
2021-07-05 ( CSS ) (0) | 2021.07.05 |
2021-07-03 ( CSS, JavaScript ) (0) | 2021.07.05 |
2021-07-02 ( CSS ) (0) | 2021.07.03 |