묻고답하기

검색도 많이 해봤는데 제이쿼리 충돌로 게시판에 글이안써질경우 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 남기남
chimmook 화면보다 큰 이미지로 열리는 창에 스크롤바 생성.... [2] 2007.08.10
워니블루 제로카운터 테이블;;  
양의석 웹관련 질문은 아니지만... 데몬을 설치중 생기는 문제 [2] 2007.08.10
김남웅 노프레임에서 include 문제 -_-; [1] 2007.08.10
이형구 카운터 설치중에 일어났어요..  
상혁닷컴 여기 오시는 분들께 phpmyadmin 어덯해 설치 하죠? [2] 2007.08.10
포터시네마 마퀴태그 에서요.. [4] 2007.08.10
ean_N 저기....제로보드를 인쿠르드 할려고 하는데... [2] 2007.08.10
적누 질문있습니다. [1] 2007.08.10
강승훈 안녕하세요~시간대별로 플래쉬 파일을 보여주는 방법 좀 가르쳐 주세요~~~ Y_Y  
Ziwoogae 왼쪽의 움직이는 메뉴 질문입니다  
한동명 의견 [1] 2007.08.10
박미해 무료계정중에 제일 조은곳이 어디인가요??? [1] 2007.08.10
류미경 swfx프로그램에 대해 질문드려요.. 꼭 답변 부탁드립니다.. [1] 2007.08.10
아드레날린 포토샵 7.0에서 둥글한... 사각형 자르기...?; [2] 2007.08.10
N+gine 게시물을 찾고 있는데요 ^^;; [3] 2007.08.10
정만조 노프레임 홈페이지를 제작하고 싶은데여..^^";; [1] 2007.08.10
Blueocean 홈페이지 짜려는데 좀 도와주세요-ㅂ-;; [1] file 2007.08.10
강창중 제 컴터로 서버돌릴때.. [1] 2007.08.10
CHOBOS 저기 나모에서 말입니다..--;;  
토깽이=Zeno™ php 관련 질문입니당~  
마루지기 한글파일명의 그림이 깨져서 나올때.. [1] 2007.08.10
임형근 IE5.5와 6.0에서 각각 다른 화면 뿌리는 방법좀... [4] 2007.08.10
양성준 최근게시물 편집중에서..  
조원규 포토샵에서 A4 사이즈 프린트할때요..궁금 [1] 2007.08.10
최양효 php관련 질문인데 급합니다... [4] 2007.08.10
연(延) 글내용의 넓이와 제로보드 글 볼때 매뉴의 넓이....  
server 플래쉬 mx가여... [2] 2007.08.10
가인 제로보드 설치 하고 있는데 [1] 2007.08.10
아이야~ 중국어 쓸때.. [1] 2007.08.10