기초공사 (html,css,javascript)
tab기능-attr,hide,show 본문
css에서는 클래스에 active가 있으면 검정바탕에 흰글씨가 생기고,
삼각형이 나온다.
그러니 내가 할일은;;;
js에서 active를 넣었다 뺐다 하면된다.
jquery에서는 hide()와 show()로 display:none / display:block로 표현할수 있다.
******************css*********************************
/*새로작성 active라는 클래스명이 있으면 검정바탕에 흰글씨*/
.work-section .tabs-nav a:hover,
.work-section .tabs-nav a.active {
background-color: rgb(51, 51, 51);
color: rgb(255, 255, 255);
}
/*새로작성 a에 active가 있을때만 삼각형이 보인다.
우리가 해야할거것은 js에서 a에 active만 넣었다뺐다하면됨.*/
.work-section .tabs-nav a.active:after {
background: url(../img/sprites.png) no-repeat 0 0;
content: "";
position: absolute;
top: 100%;
left: 50%;
width: 37px;
height: 19px;
margin-left: -18px;
}
*******************jquery***************************
'jquery' 카테고리의 다른 글
tabs_jqueryui.com (0) | 2023.02.18 |
---|---|
같은 화면 attr로 구하기 vs index로 구하기 (0) | 2023.02.18 |
16_shrink / attr / swtch (0) | 2023.02.09 |
hasClass / attr (2) | 2023.02.03 |
mouseover시 위치변동 (0) | 2023.02.03 |