jQuery 오류(?) 질문 드립니다..

jQuery 오류(?) 질문 드립니다..

QA

jQuery 오류(?) 질문 드립니다..

본문

https://sir.kr/qa/378026 이 질문(글쓰기창 오류)을 했었는데여..

개발자도구 켜서 jquery 문제있다고해서 찾아봤는데 

저거 문제 맞을까여?

혹시 맞다면 고칠 방법 좀 알려주실 수 있나여?ㅜ

 

(function($) {
    $.fn.viewimageresize = function(selector)
    {
        var cfg = {
                selector: "img"
            };

        if(typeof selector == "object") {
            cfg = $.extend(cfg, selector);
        } else {
            if(selector) {
                cfg = $.extend({ selector: selector });
            }
        }

        var $img = this.find(cfg.selector);
        var $this = this;

        $img.removeAttr("height")
            .css("height", "");

        function image_resize()
        {
            var width = $this.width();

            $img.each(function() {
                if($(this).data("width") == undefined)
                    $(this).data("width", $(this).width());

                if($(this).data("width") > width) {
                    $(this).removeAttr("width")
                           .removeAttr("height")
                           .css("width","")
                           .css("height", "");

                    if($(this).data("width") > width) {
                        $(this).css("width", "100%");
                    }
                } else {
                    $(this).attr("width", $(this).data("width"));
                }
            });
        }

        $(window).on("load", function() {
            image_resize();
        });

        $(window).on("resize", function() {
            image_resize();
        });
    }

    $.fn.viewimageresize2 = function(selector)
    {
        var cfg = {
                selector: "img"
            };

        if(typeof selector == "object") {
            cfg = $.extend(cfg, selector);
        } else {
            if(selector) {
                cfg = $.extend({ selector: selector });
            }
        }

        var $img = this.find(cfg.selector);
        var $this = this;

        function image_resize()
        {
            var width = $this.width();

            $img.each(function() {
                $(this).removeAttr("width")
                       .removeAttr("height")
                       .css("width","")
                       .css("height", "");

                if($(this).data("width") == undefined)
                    $(this).data("width", $(this).width());

                if($(this).data("width") > width) {
                    $(this).css("width", "100%");
                }
            });
        }

        $(window).on("resize", function() {
            image_resize();
        });

        image_resize();
    }
}(jQuery));

 

3553139996_1600749569.706.png

이 질문에 댓글 쓰기 :

답변 3

다른 페이지에서는 아래처럼 정상적으로 jquery를 불러옵니다만 게시판 view 페이지에서는 못 불러오네요. 해당 게시판 header 부분에서 불러오는 파일 확인해 보세요. jquery를 안 쓴 게 아닌가 싶네요.

<script src="http://vlovemeiwonv.cafe24.com/js/jquery-1.12.4.min.js?ver=191202"></script>
<script src="http://vlovemeiwonv.cafe24.com/js/jquery-migrate-1.4.1.min.js?ver=191202"></script>

순수 그누보드 신가요? 아니면 빌더쓰셨나요?

순수 그누보드라는 전재하에서만 말씀드리겠습니다

일단 사이트를 치고들어가보니 댓글출력이 전혀 안되고있습니다

댓글숨김,열기 같은경우에는 아래 데이터를 출력해놓고 해당 버튼을통해 보여주고 닫고를 하는방식인데 사이트를 들어가보니 댓글 출력이 전혀 안되어있어요

그렇다면 이건 스크립트 문제 이전에 댓글 출력을 먼저 보셔야할것같네요

쟁반짜장님 말씀대로 다른 스크립트들이 없는것같네요

head.sub.php 인클루드 정상적으로 되었는지 확인해보시고

빌더사용중이시라면 빌더에서 별도로 js를 호출하는게 있는지 확인해서 넣어보세요

답변을 작성하시기 전에 로그인 해주세요.
전체 2,026
QA 내용 검색
filter #css ×

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT