w

그누보드 제이쿼리 적용 문제 때문에 문의드려요 ㅠㅠ

현재 탑에 제이쿼리를 적용하는데 계속 독타입떄문에(?) 오류가 생겨 문의드립니다.



인덱스 - 해드 - 제이쿼리 탑메뉴 이런식으로 불러오는데



//제이쿼리 탑메뉴---------------------------------------//

<?
if(!$g4[path])
$g4[path] = "..";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>UI Elements: Large Drop Down Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="UI Elements: Large Drop Down Menu" />
<meta name="keywords" content="jquery, drop down, menu, navigation, large, mega "/>

<link rel="stylesheet" href="/designshop/images/css/style.css" type="text/css" media="screen"/>
<script type="text/javascript">
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;

</script>


</head>
<body>...............

제이쿼리 메뉴 소스 ~~~~`

~~~~~~~~~

~~~~~~`

<script type="text/javascript" src="</script">http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
/**
* the menu
*/
var $menu = $('#ldd_menu');

/**
* for each list element,
* we show the submenu when hovering and
* expand the span element (title) to 510px
*/
$menu.children('li').each(function(){
var $this = $(this);
var $span = $this.children('span');
$span.data('width',$span.width());

$this.bind('mouseenter',function(){
$menu.find('.ldd_submenu').stop(true,true).hide();
$span.stop().animate({'width':+'px'},0,function(){
$this.find('.ldd_submenu').slideDown(500);
});
}).bind('mouseleave',function(){
$this.find('.ldd_submenu').stop(true,true).hide();
$span.stop().animate({'width':$span.data('width')+'px'},0);
});
});
});
</script>



</body>

</html>

----------------------------------------------------------



//인덱스 -----------------------------------------------------------//

<?
include_once("./_common.php");
$g4['title'] = "";
include_once("./head-wib2.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<? if($mode != "pc") { ?>
<script type="text/javascript">
var mobilewords = new Array('iPhone', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson');
for (var word in mobilewords) {
if (navigator.userAgent.match(mobilewords[word]) != null ) {
location.href = "http://m.designwib.co.kr";
break;
}
}
</script>
<? } ?>

<html>
<head>
<title>UI Elements: Large Drop Down Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="UI Elements: Large Drop Down Menu" />
<meta name="keywords" content="jquery, drop down, menu, navigation, large, mega "/>


<!-- ∏?¿Œ?≠∏? √÷Ω쩁±? Ω√¿? -->
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<script language="JavaScript">
<!--
function persw_goto_byselect(sel, targetstr)
{
var index = sel.selectedIndex;
if (sel.options[index].value != '') {
if (targetstr == 'blank') {
window.open(sel.options[index].value, 'win1');
} else {
var frameobj;
if ((frameobj = eval(targetstr)) != null)
frameobj.location = sel.options[index].value;
}
}
}

//-->
</script>
</head>

<?
// ª?ø?π˝ popup("Ω∫쩁≤∏?", 쩁쭨¿?∫?∏?, "∫­∑˘∏?");
echo popup("basic", pop, "index");
?>
<body>



--------------------------------------------------------



///해드----------------------------------------------------////

<?

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가



include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/mw.sms.lib.php");
include_once("$g4[path]/lib/popup.lib.php");
include_once("$g4[path]/lib/zgallery.lib.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/banner.lib.php"); // 이 소스는 head 파일에 넣어 주세요
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");

include_once("$g4[path]/head.sub.php");


//print_r2(get_defined_constants());



// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.

// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.



$table_width = 963;

?>


<!-- 상단 배경 시작 -->

<!-- 상단 로고 및 버튼 시작 -->

<style type="text/css">
#outline1 {position:relative;text-align:left;width:967px;margin:0 auto;z-index: 2;}
#visual1 { position:absolute;top:180px;left:625px;z-index: 1;}
#outline2 {position:relative;text-align:left;width:100px;margin:0 auto;z-index: 10000;}
#visual2 {position:absolute;top:-4px;left:-26px;z-index: 11000;}
</style>
<!-- 자바시작 --><script language=JavaScript type=text/JavaScript>
function MM_showHideLayers()
{ var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3)
if ((obj=MM_findObj(args[i]))!=null)
{
v=args[i+2];
if (obj.style)
{
obj=obj.style;
v=(v=='show')?'visible':(v='hide')?'hidden':v;
}
obj.visibility=v;
}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script><script language=JavaScript type=text/JavaScript>
image1on = new Image;
image1on.src = "<?=$g4[path]?>/wibimg/topMenu_01.jpg";
image1off = new Image;
image1off.src = "<?=$g4[path]?>/wibimg/a.gif";
image2on = new Image;
image2on.src = "<?=$g4[path]?>/wibimg/b-1.gif";
image2off = new Image;
image2off.src = "<?=$g4[path]?>/wibimg/b.gif";
image3on = new Image;
image3on.src = "<?=$g4[path]?>/wibimg/c-1.gif";
image3off = new Image;
image3off.src = "<?=$g4[path]?>/wibimg/c.gif";
image4on = new Image;
image4on.src = "<?=$g4[path]?>/wibimg/d-1.gif";
image4off = new Image;
image4off.src = "<?=$g4[path]?>/wibimg/d.gif";
image5on = new Image;
image5on.src = "<?=$g4[path]?>/wibimg/e-1.gif";
image5off = new Image;
image5off.src = "<?=$g4[path]?>/wibimg/e.gif";
image6on = new Image;
image6on.src = "<?=$g4[path]?>/wibimg/f-1.gif";
image6off = new Image;
image6off.src = "<?=$g4[path]?>/wibimg/f.gif";

function img_on(imgName) {
imgOn = eval(imgName + "on.src");
document[imgName].src = imgOn;
}

function img_off(imgName) {
imgOff = eval(imgName + "off.src");
document[imgName].src = imgOff;
}
</script><!----------------------------------------- 자바끝 ------------------------------------------>





-------------------------------------------------------------------





현재 탑메뉴에 적용한 제이쿼리가 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 이 독타입에서만 적용되는거 같은데..



인덱스 자체에서 계속 <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -->

요걸 불러와서 현재 제이쿼리가 동작을 안하는거 같습니다..



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

독타입이 메인에서 불어올수 잇게끔 넣어야될거 같은데...

방법을 모르겟네요...



기존<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> --> 이건또 어디서 불러오는건지 수정을

할려고 해도 모르겟네요 ㅠㅠ

현재 이것저것 페이지에 독타입을 넣어봣는데 잘못넣은건지...자꾸 같은 현상이네요



그누보드는 처음 독타입 설정하는 페이지가 따로 잇다거나 그런가요?



적용한 제이쿼리 소스는 http://tympanus.net/codrops/2010/07/14/ui-elements-search-box/

요걸 사용해서 수정햇거든요...







독타입넣는위치나, 현재 문제점이나 수정방법 도움 꼭좀 부탁드릴꼐요~

감사합니다...
|

댓글 2개

그누보드 / head.sub.php 파일을 열면 해당 독타입이 주석된 내용을 보실수 있습니다.
그곳에 넣어보세요.
답변정말 감사드립니다.

사용하려는 제이쿼리가...<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 에서만 작동하거든요...

기존 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -->
을 해당 독타입으로 교체하면...위에 제이쿼리는 작동이 되는데...기존 메인에 다른 제이쿼리 사용한거랑 메인이 틀어지네요....독타입을 2개 쓰던지....각각 적용할수 잇는방법이 없을까요?

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기
🐛 버그신고