제이쿼리 a태그 href 변경 질문

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
제이쿼리 a태그 href 변경 질문

QA

제이쿼리 a태그 href 변경 질문

답변 1

본문

html 식 이렇게 된 식이 6개가 있습니다

                        <div class="mix web C_boot" href="img/agency/portfolio/grid/grid-1.jpg" title="Client Name">
                            <div class="portfolio-wrapper">
                                <img src="/img/bootstrap.jpg" alt="">
                                <div class="caption">
                                    <div class="caption-text">
                                        <a class="text-title">Bootstrap</a>
                                        <span class="text-category">NCS 포트폴리오</span>
                                    </div>
                                    <div class="caption-bg"></div>
                                </div>
                            </div>
                     </div>

 

플러그인

        markup: '<div class="mfp-figure">'+
                    '<div class="mfp-close"></div>'+
                    '<figure>'+
            '<figure>'+
            '<a href="#" class="addHref" target="_blank">'+
                        '<div class="mfp-img" target="_blank"></div>'+
            '</a>'+
            '</figure>'+
                        '<figcaption>'+
                            '<div class="mfp-bottom-bar">'+
                                '<div class="mfp-title"></div>'+
                                '<div class="mfp-counter"></div>'+
                            '</div>'+
                        '</figcaption>'+
                    '</figure>'+
                '</div>',
        cursor: 'mfp-zoom-out-cur',
        titleSrc: 'title',
        verticalFit: true,
        tError: '<a href="%url%">The image</a> could not be loaded.'
    }

 

제가 쓴 식

  $(".C_boot").find( '.addHref').attr("href", "http://www.naver.com")

 

부트스트랩으로 포트폴리오 만드는 와중

markup이 공통으로 들어가고

div class="mfp-img"가 웹에서 봤을때 img태그로 변경되어 나와

a태그로 한번 감싸 부모를 한번 타고 들어가 각각의 href 값으로 변경하려 했습니다

href변경 하는 식을 구글링해 식에 넣었으나 계속 index 페이지가 나와 질문 합니다

어디가 잘못 된건 가요?

 

B 를 누르면 팝업창이 뜹니다

 

 

3068254795_1586589216.0187.png                  3068254795_1586589235.3577.png

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 0
© SIRSOFT
현재 페이지 제일 처음으로