묻고답하기

검색도 많이 해봤는데 제이쿼리 충돌로 게시판에 글이안써질경우 xe자체에 제이쿼리가 있기때문에

원래 있는 소스에는 제이쿼리를 지우고 js파일은

jQuery(function($){

(스크립트)

});

 

이렇게 감싸주라고 하시던데.. 이틀째해봐도 해결이 안되서 질문올려봅니다!

 

처음에 게시판에 글이안써지길래 jquery-relation.min.js 이 파일을 지워주니깐 게시판에 글을써지는데요

상단 메뉴가 작동을 안하더라고요.

 

상단 메뉴 js 소스는


var util = {
 user : function(type){
   if(!type) return;
   if(type=="ie") return (!!(window.attachEvent && !window.opera));
   if(type=="firefox") return (navigator.userAgent.toLowerCase().indexOf("firefox")!=-1);
   if(type=="opera") return (!!window.opera);
   if(type=="webkit") return (navigator.userAgent.indexOf("AppleWebKit/") > -1);
   if(type=="gecko") return (navigator.userAgent.indexOf("Gecko") > -1 && navigator.userAgent.indexOf("KHTML") == -1);
   if(type=="mobile") return (navigator.userAgent.match(/iPhone|iPad|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null || navigator.userAgent.match(/phone|samsung|lgtel|mobile|skt|nokia|blackberry|android|sony/i) != null);
   return type;
   
 },
}
var page={
 wrap : null, active : [0,0,0], depName : ["g", "l", "s"],
 gnb : {
  $obj : null, obj : null, resettimer : null, flag : false, maxH : null, minH : null, dep1 : null, dep2 : null,
  over : function(){
   var gnb = page.gnb;
   if(gnb.$obj.height()==gnb.maxH) return;
   gnb.$obj.find(".dep2").show();
   gnb.$obj.stop().animate({"height":gnb.maxH},300,'easeInOutCubic');
  },
  out : function(){
   var gnb = page.gnb;
   if(gnb.$obj.height()==gnb.minH) return;
   gnb.$obj.stop().animate({"height":gnb.minH},300,'easeInOutCubic');
  },
  one : function(type){ // 마우스 오버& 탭 안에서 마우스 이동
   var gnb = page.gnb;
   var idx = gnb.dep1.index(this.parentNode.parentNode)+1; //마우스 오버한 위치.index
   gnb.dep1.not(this.parentNode.parentNode).find(".dep2").children().children("a").removeClass("active").end().end().end().end().removeClass("active").filter(this.parentNode.parentNode).addClass("active");
   if(navigator.userAgent.toLowerCase().indexOf("msie 7.0")==-1){
    this.parentNode.parentNode.parentNode.setAttribute("class","gnb gnbImg0"+idx);
   }else{
    document.getElementById("gnb2").style.backgroundImage="url(/img/gnb_left_img_0"+idx+".gif)";
   }
   if(type!=true) gnb.over();
  },
  two : function(type){
   var gnb = page.gnb, $this = $(this);
   gnb.dep2.removeClass("active").filter(this).addClass("active");
   if(type!=true) gnb.one.call($this.parent().parent().prev().find("a")[0]);
  },
  resetaction : function(){ //마우스 아웃
   var gnb = page.gnb;
   if(page.active[0] <= gnb.dep1.length && page.active[0]-1 != -1) gnb.one.call(gnb.dep1.filter("."+page.depName[0]+ page.active[0]).find("strong a")[0], true);
   else gnb.dep1.removeClass("active");
   if(page.active[1] <= gnb.dep1.find(".dep2").children().children("a").length && page.active[1]-1 != -1) gnb.two.call(gnb.dep1.filter("."+page.depName[0]+ page.active[0]).find("."+page.depName[1]+ page.active[1]).children("a")[0], true);
   else gnb.dep2.removeClass("active");
   gnb.out();
  },
  clearreset : function(){ clearTimeout(page.gnb.resettimer); },
  reset : function(nodelay){
   var gnb=page.gnb;
   gnb.clearreset();
   if(gnb.$obj.find(":focus").length>0 || page.gnb.flag) return false;
   if(nodelay===true) gnb.resetaction(true);
   else gnb.resettimer=setTimeout(function(){ gnb.reset(true); }, 300);
  },
  init : function(){
   var gnb = this;
   gnb.$obj = $("#gnb .gnb");
   gnb.$obj.parent().append('<span class="subLine"></span>').parent().prepend('<span class="subLine"></span>'); //그림자 효과.
   gnb.obj = gnb.$obj[0];
   gnb.maxH = gnb.obj.scrollHeight;
   gnb.minH = gnb.obj.offsetHeight;
   gnb.$obj.mouseover(function(){ gnb.flag = true; gnb.clearreset(); gnb.over.call(this); })
    .mouseout(function(){ gnb.flag = false; gnb.reset(); })
    .find("strong a").focus(function(){ gnb.clearreset(); gnb.one.call(this); })
    .each(function(){ if(util.user('mobile')){ this.onclick = function(){ gnb.clearreset(); gnb.one.call(this); return false; } } }) //모바일 클릭
    .mouseover(function(){ gnb.flag = true; gnb.clearreset(); gnb.one.call(this); })
    .blur(gnb.reset);
   gnb.dep1 = gnb.$obj.children();
   gnb.dep2 = gnb.$obj.find(".dep2").hide().children().children("a").focus(gnb.two).mouseover(gnb.two).blur(gnb.reset);
   gnb.resetaction();
  }
 },
 path : {
  $obj : null, resettimer : null, flag : false,
  one : function(){
   $(this).parent().addClass("view").parent().find(".view").not(this.parentNode).removeClass("view").find(".other").slideUp(100).end().end().end().end().end().next().slideDown(100,function(){ this.style.display = "block" });
  },
  two : function(){
   if(this.className.match(/more/)){
    $(this).parent().addClass("active").end().next().css({"display":"block"}).parent().parent().children().not(this.parentNode).removeClass("active").find(".dep3").css({"display":"none"});
   }else{
    $(this).parent().addClass("active").parent().children().not(this.parentNode).removeClass("active").find(".dep3").css({"display":"none"});
   }
  },
  
  init : function(){
   var path = this;
   if(page.gnb.$obj == 0 || page.active[0] == 0) return;
   var curPath = page.gnb.$obj.find("."+page.depName[0]+page.active[0]);
   var dep2, dep3, dep2This, dep3This;
   var html   = '<div class="location"><div class="locationIn"><a href="../main/main.html" class="home">home</a>';
   html += curPath.find("strong").html();
   dep2 = curPath.children(".dep2").children();

   if( curPath.find("."+page.depName[1]+page.active[1]).length > 0 ){
    html += '<span class="sub">';
    html += '<a href="'+curPath.find("."+page.depName[1]+page.active[1]+" a").first().attr("href")+'"><span class="arr">'+curPath.find("."+page.depName[1]+page.active[1]+" a").first().text()+'</span></a>';
    dep2.each(function(i){
     dep2This = $(this);
     if(dep2.length>0 && i==0) html += '<span class="other">';
     dep3 = dep2This.find(".dep3").children();
     html += '<span class="'+dep2This.attr("class")+' '+dep2This.find("a").first().attr("class")+'"><a href="'+dep2This.find("a").first().attr("href")+'" class="'+(dep3.length>0 ? 'more' : '')+'">'+dep2This.find("a").first().text()+'</a>';
     dep3.each(function(j){
      dep3This = $(this);
      if(j==0) html += '<span class="dep3">';
      html += '<span class="'+dep3This.attr("class")+'"><a href="'+dep3This.find("a").first().attr("href")+'">'+dep3This.find("a").first().text()+'</a></span>';
      if(j==dep3.length-1) html += '</span>';
     });
     html += '</span>';
     if(dep2.length>0 && i==dep2.length-1) html += '</span>';
    });
    html += '</span>';

    dep3 = curPath.find("."+page.depName[1]+page.active[1]).find(".dep3").children();
    if(dep3.length > 0){
     if(dep3.filter("."+page.depName[2]+page.active[2]).length>0){
      html += '<span class="sub">';
      html += '<a href="'+dep3.filter("."+page.depName[2]+page.active[2]).find("a").first().attr("href")+'"><span class="arr">'+dep3.filter("."+page.depName[2]+page.active[2]).find("a").first().text()+'</span></a>';
      if(dep3.length>1) html += '<span class="other">';
       dep3.each(function(j){
       dep3This = $(this);
       html += '<span class="'+dep3This.attr("class")+' '+( dep3This.attr("class")==page.depName[2]+page.active[2]?' active':'' )+'"><a href="'+dep3This.find("a").first().attr("href")+'">'+dep3This.find("a").first().text()+'</a></span>';
      });
      if(dep3.length>1) html += '</span>';
      html += '</span>';
     }
    }
   }
   html += '</div></div>';

   $("#container .titleDep1").after(html);
   this.$obj = $("#container .locationIn");
   if(this.$obj == 0) return;
   page.winTitle();
   var curName = "";
   this.$obj.children().eq(2).addClass("fixed").end().last().each(function(){
    if(this.nodeName.toLowerCase()=="a") $(this).addClass("last");
    else $(this).children("a").first().addClass("last");
   });
   this.$obj.find(".sub").children().each(function(){
    if(this.nodeName.toLowerCase()=="a"){
     curName = $(this).mouseover(function(){ path.flag = true; path.clearreset(); path.one.call(this); }).focus(function(){ path.flag = true; path.clearreset(); path.one.call(this); }).text();
     if(util.user('mobile')){ this.onclick = function(){ path.flag = true; path.clearreset(); path.one.call(this); return false; } } //모바일 클릭
    }else{
     $(this).children().find("a").not(".more").mouseover(function(){ path.flag = true; $(this).parent().parent().children().removeClass("active"); path.two.call(this); }).focus(function(){ path.flag = true; $(this).parent().parent().children().removeClass("active"); }).end().end().find(".more").each(function(){
      if(util.user('mobile')){ this.onclick = function(){ path.flag = true; path.clearreset(); path.two.call(this); return false; } } //모바일 클릭
      $(this).mouseover(function(){ path.flag = true; path.clearreset(); path.two.call(this); })
       .focus(function(){ path.flag = true; path.clearreset(); path.two.call(this); })
       .next().find("a").mouseover(function(){ path.flag = true; path.clearreset(); path.two.call($(this).parent().parent().prev()[0]); })
       .focus(function(){ path.flag = true; path.clearreset(); path.two.call($(this).parent().parent().prev()[0]); });
     });
    }
   });
   this.$obj.find("a").blur(function(){ path.flag = false; path.reset.call(this); })
    .mouseout(function(){ path.flag = false; path.reset.call(this); });
  }
 },
 
 footer : {
  $obj : null,
  wing : {
   $obj : null, baseSc : 0, baseMg : 0, maxWidth : 1060,
   sc : function(){
    var wing = page.footer.wing;
    var $obj = ($("html").scrollTop() > $("body").scrollTop()) ? $("html") : (($("html").scrollLeft() > $("body").scrollLeft()) ? $("html") : $("body"));
    var obj = $obj.get(0);
    if(obj.scrollTop <= wing.baseSc) wing.$obj.css({"top":(wing.baseSc-obj.scrollTop)+"px"});
    else wing.$obj.css({"top":0});
    if(obj.clientWidth < wing.maxWidth)  wing.$obj.css({"left":0,"margin-left":(wing.maxWidth-obj.scrollLeft-wing.$obj.width()-20)+"px"});
    else wing.$obj.css({"left":"auto","right":"20px","margin-left":wing.baseMg});
   },
   init : function($obj){
    //this.baseSc = (page.active[0]==0) ? 290 : this.$obj.offset().top;
    this.baseMg = ((this.maxWidth/2)-this.$obj.width())+"px";
    if(!util.user("mobile")){
     this.$obj.css({"position":"fixed","top":this.baseSc+"px"})
     $(window, "body", "html").resize(this.sc).scroll(this.sc)
     this.sc();
    }
   }
  },
  
  init : function(){
   this.$obj = $("#footer");
   if(this.$obj.length==0) return;
   this.$obj.find(".gnbWrap").html(page.gnb.$obj.parent().html());
   this.family();
   this.wing.init();
  }
 },
 init : function(){
  this.wrap = $('#wrap');
  this.footer.wing.$obj = $("#footer .sideMenu");
  if(page.wrap.length>0){
   if(!page.wrap[0].className) return;
   if(!page.wrap[0].className.match(/active-/)) return;
   var acNum = page.wrap[0].className.replace(/active-/g,'').split('-');
   for(i=0;i<acNum.length;i++) page.active[i] = parseFloat(acNum[i]);
  }
  this.gnb.init();
  this.footer.init();
  this.path.init();
  
 }
}

 

이렇게 되고요. 전체적으로

jQuery(function($){

(스크립트)

});

이렇게 감싸줘도 작동을 안하네요?

혹시 위 js 파일이 xe에 영향을 주는 부분이 있나요 ?

아니면 jquery-relation.min.js 이 파일을 수정하면 되는건지..

어떤부분이 문제일까요 .. ? 아직미숙하다보니 질문이 이해하기 힘드시진않을지 걱정이네요.

답변 부탁드립니다 . 감사합니다 !

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
원보드 xe core 1.4.2.2 쓰려면 php 버전 몇과 호환이 되나요? [2] 2015.07.21 by 원보드
lemon 업데이트 이후 메뉴 생성 문제  
킴스영스 쓴 글 추적시 익명글은 불가능한가요?  
dasjjisad321 관리자 글이 항상 위로 가게 어떻게하나요?>  
야야야료 미챠버릴꺼 같숨다 도와주세요 분류관리가 안뜹니다 ㅠ [1] file 2015.07.21 by DoorWeb
dasjjisad321 일반 사용자가 게시판에 글을써도 공지사항으로 떠버럽니다. [1] 2015.07.21 by dasjjisad321
파워XE 모듈업데이트들 했더니 에러가 납니다. 도와주세요.autoload.php on line 6 [3] 2015.07.21 by 파워XE
소탕 메뉴상단바 폰트 크기 수정 문의요 file  
빈폴 제이쿼리 충돌? 게시판에 글을쓸수가 없네요..  
김토미 PHP 5.2 에 설치할수있는 XE 버전이 몇인가요? [2] 2015.07.21 by YJSoft
불량춤꾼1 ip 차단은 있는데 ip인증은 없는 건가요? [1] 2015.07.21 by 서방서방
엔젤킬러 PHP Version 4.4.7 입니다. [3] 2015.07.21 by 엔젤킬러
로스트(ROST) 관리자페이지 깨짐현상 [2] file 2015.07.21 by 서방서방
JnCsoft 테이블 읽기 전용이라며 오류발생  
Devkang embedwhiteurl.xml 서브도메인을 일괄적 처리할수없나요?  
키스미베이베 이번 버전 1.8.7에 뭐가달라진건가요? 경매모듈이...  
이주연743 회원가입 후 이동할 페이지 url 로 [12] 2015.07.21 by 이주연743
이주연743 회원가입 후 이동할 페이지 url로 [5] 2015.07.21 by 이주연743
마이웹 ckeditor 에 접근하는 자바스크립트 변수가 뭔가요?  
lemon 레이아웃 XEDTION 슬라이드 사이즈  
크루미 추천 제한에 대한 질문입니다  
jbr 설치중 에러발생 [1] file 2015.07.20 by Podongi
pds**** 디자인설정에서 레이아웃 변경시 [2] 2015.07.20 by pds****
우띄 흐름of이미지 위젯에 스크롤이 달려서 나옵니다~ file  
피파링맨 incorrect string value .... 오류 해결하는 방법 좀 알려주세요.  
파워XE 업그레이드 했더니 관리하기 들어가면 에러가 납니다. [5] 2015.07.20 by iswonlive
공학소녀 애드온 설치 하는 방법 [1] 2015.07.20 by iswonlive
kkim1981 입력한 내용을 이메일로 받을수 있나요? [1] 2015.07.20 by iswonlive
thdwjdtjr 한개의 XE에서 2개의 사이트를 운영코자 합니다. [3] 2015.07.20 by 로이조52
thdwjdtjr 익스버전이 낮으면 동영상이 나오지 않습니다. [2] 2015.07.20 by thdwjdtjr