탭메뉴 관련(자바스크립트) 채택완료
탭 메뉴 관련으로 작성을 하고 있는데요.
다른 곳에서 사용했던 것 가져와서 해보고 있는데 안되네요..
뭐가 문제인지..
위에가 javascript 영역이며,
HTML 영역은
css는
ul {list-style-type:none;margin:0;padding:0;}
.blue_tab_set {width:745px;margin:0 auto;margin-top:50px;height:50px;} .blue_tab_set li {width:368px; margin-bottom:40px;border:1px solid #6d6d6d;display:inline-block;} .blue_tab_set li a {display:block; width:100%; height:50px; text-align:center; font-size:14px; color:#525252;line-height:50px;white-space:nowrap; overflow:hidden; word-break:break-all; text-overflow:ellipsis;} .blue_tab_set li.focus a {color:#fff; background:url("../img/blue_tab_bg_over.gif") no-repeat;} .hidden {display:none;}
이렇게 구성하였습니다.
자바스크립트 click이 작동을 하지 않습니다... 답변을 부탁드려요...
답변 1개
$(function() { $('.event_focus a').click(function(){ $('.event_focus').removeClass('focus'); $(this).parent().addClass('focus'); })
// 연혁 소개 TAB $(".event_focus a").click(function(){ var key = $(this).attr("id");
console.log(key); if( $("#his_"+key).css("display") != "block" ){ $(".his_con_item").hide(); $("#his_"+key).show(); } })
});
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인