채택완료

Mmenu.js 사용시 에디터 2번출력 에러

2015-03-26 (목) 22:11:12 6,377

안녕하세요.

mmenu.js (http://mmenu.frebsite.nl/) 사용시 (페이지 내 아래 스크립스 사용시)

 

  $("#mmenu").mmenu({

    offCanvas : {

    position  : "right",

    zposition : "front"

    }

  }) 

 

 

아래 캡쳐처럼 에디터(Smart Editor2)가 두번 출력되는 기이한 현상에 대한 수정방법이 도무지 

플러그인폴더/에디터 js 파일을 뒤져봐도 ..

jquery.mmenu.js 를 뒤져봐도.. (http://mmenu.frebsite.nl/mmenu/js/jquery.mmenu.min.all.js?v=5.0.1)​

핵노답입니다.

살려주세요...

 

 

dad686c1fab808e76c7c13261d0c1ab1_1427375350_6155.png
 

답변 1개 / 댓글 1개

채택된 답변
+20 포인트

이런 문제는 대부분 중복으로 로드해 오기 때문에 생깁니다.

/plugin/editor/smarteditor/config.js 파일을 수정해 보세요.

var get_id = $(this).attr("id");

if( !get_id || $(this).prop("nodeName") != 'TEXTAREA' ) return true; 

위와 같이 되어 있는 소스를 아래와 같이 바꿔보세요.

Copy
var get_id = $(this).attr("id");             var editor_chk = $(window).data('smarteditor'+get_id);            if( typeof editor_chk !== 'undefined' ){  //id 를 체크하여 중복으로 불러오는것을 방지한다.                return true;            }            $(window).data('smarteditor'+get_id, true);             if( !get_id || $(this).prop("nodeName") != 'TEXTAREA' ) return true;

답변에 대한 댓글 1개

정확합니다!! ㅠㅡㅠ
thisgun 님 덕분에 정말 일주일 골머리싸매던 문제를 2분만에 해결했네요.. ㅠㅠ 사랑합니다..

답변을 작성하려면 로그인이 필요합니다.