채택완료
list가 active되었을때 버튼이름 변경 및 리스트에 초점이 첫 번째로 가도록
답변 2개 / 댓글 3개
채택된 답변
+20 포인트
2025-01-13 (월) 15:55:50
이전에도 답변드렸지만
해당 내용의 방법을 알려드렸음에도 이번 내용은 본인 능력을 상회하는 작업같습니다..
속편하게 의뢰로 가심이 어떠실지...
답변에 대한 댓글 1개
skqhdjk2
2025-01-13 (월) 16:08:13
정말 어렵네요ㅠ 최대한 제가 열심히 다시 풀어보겠습니다! 항상 답변 빠르게 주셔서 감사합니다!
2025-01-13 (월) 16:33:51
한가지 더 조언드리자면 챗GPT 를 맹신하지 마세요.
챗GPT 는 모른다는 말을 하지 않습니다.
모름에도 불구하고 다른 거짓된 정보를 알려줘서 혼동을 주기도 합니다.
답변에 대한 댓글 2개
skqhdjk2
2025-01-13 (월) 16:39:00
아 넵 챗gpt는 활용하긴 해도 가끔씩은 너무 혼동되고 어려운코드를 짜주더라고요 최대한 간단하게
제가 짤 수 있게 노력해보겠습니다
제가 짤 수 있게 노력해보겠습니다
skqhdjk2
2025-01-13 (월) 17:08:49
/* 공지사항 */
$(function(){
// 탭 클릭 이벤트
$('.brief').find('li > a').on('click', function () {
const $this = $(this);
const $parentLi = $this.parent('li');
// 활성화 상태 설정
$parentLi.addClass('active').siblings('li').removeClass('active');
$('.brief').find('li > a').attr('title', '');
$this.attr('title', '선택됨');
// bx-controls-direction 버튼 텍스트 업데이트
updateControlText($this.text());
});
$('.brief-list').bxSlider({
//infiniteLoop: false,
auto:false,
speed:1000,
pause:5000,
maxSlides:4,
moveSlides:1,
slideWidth:313,
slideMargin:0,
responsive:true,
mode:'horizontal',
controls:true,
pager:false,
onSliderLoad: function(){
$(".bx-clone").find("a").prop("tabIndex","-1");
},
onSlideAfter: function(){
$(".mainSlider").children("li").each(function(){
if($(this).attr("aria-hidden") == "false"){
$(this).find("a").attr("tabIndex","0");
}else{
$(this).find("a").attr("tabIndex","-1");
}
});
}
});
});
// 컨트롤 텍스트 업데이트 함수
function updateControlText(tabText) {
const prevText = `${tabText} 이전`;
const nextText = `${tabText} 다음`;
$('.bx-controls-direction .bx-prev').text(prevText);
$('.bx-controls-direction .bx-next').text(nextText);
}
});
오 이렇게 해서 수정했어요 감사해요!!!!!!
$(function(){
// 탭 클릭 이벤트
$('.brief').find('li > a').on('click', function () {
const $this = $(this);
const $parentLi = $this.parent('li');
// 활성화 상태 설정
$parentLi.addClass('active').siblings('li').removeClass('active');
$('.brief').find('li > a').attr('title', '');
$this.attr('title', '선택됨');
// bx-controls-direction 버튼 텍스트 업데이트
updateControlText($this.text());
});
$('.brief-list').bxSlider({
//infiniteLoop: false,
auto:false,
speed:1000,
pause:5000,
maxSlides:4,
moveSlides:1,
slideWidth:313,
slideMargin:0,
responsive:true,
mode:'horizontal',
controls:true,
pager:false,
onSliderLoad: function(){
$(".bx-clone").find("a").prop("tabIndex","-1");
},
onSlideAfter: function(){
$(".mainSlider").children("li").each(function(){
if($(this).attr("aria-hidden") == "false"){
$(this).find("a").attr("tabIndex","0");
}else{
$(this).find("a").attr("tabIndex","-1");
}
});
}
});
});
// 컨트롤 텍스트 업데이트 함수
function updateControlText(tabText) {
const prevText = `${tabText} 이전`;
const nextText = `${tabText} 다음`;
$('.bx-controls-direction .bx-prev').text(prevText);
$('.bx-controls-direction .bx-next').text(nextText);
}
});
오 이렇게 해서 수정했어요 감사해요!!!!!!
답변을 작성하려면 로그인이 필요합니다.