나는 http://fremont.alchemycs.com에서 WordPress 사이트를 개발 중이며 계속 jQuery 문제가 발생합니다. jQuery를 사용하는 페이지에는 페이지 상단에 슬라이드 쇼가 있고 사이드 바에 아코디언 메뉴가있는 두 가지 기능이 있습니다. 웬일인지, 나는 그들을 양쪽 다 일하게 할 수 없다. jQuery를로드하는 위치에 따라 "함수가 아닙니다"오류가 발생합니다. 위에서 내 헤더 경우jQuery 로딩 문제
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<title>Fremont, Seattle</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="http://fremont.alchemycs.com/wp-content/themes/center/style.css" />
<link rel="pingback" href="http://fremont.alchemycs.com/xmlrpc.php" />
<!--
<script src="http://fremont.alchemycs.com/wp-content/themes/center/js/modernizr-1.6.min.js"></script>
-->
<link rel="alternate" type="application/rss+xml" title="Fremont, Seattle » Feed" href="http://fremont.alchemycs.com/feed/" />
<link rel="alternate" type="application/rss+xml" title="Fremont, Seattle » Comments Feed" href="http://fremont.alchemycs.com/comments/feed/" />
<link rel="alternate" type="application/rss+xml" title="Fremont, Seattle » Home Comments Feed" href="http://fremont.alchemycs.com/home/feed/" />
<link rel='stylesheet' id='ccf_custom-css' href='http://fremont.alchemycs.com/wp-content/plugins/constant-contact-form/class/ccf_custom.css?ver=3.2.1' type='text/css' media='screen' />
<link rel='stylesheet' id='contact-form-7-css' href='http://fremont.alchemycs.com/wp-content/plugins/contact-form-7/styles.css?ver=3.1' type='text/css' media='all' />
<link rel='stylesheet' id='amr-ical-events-list-css' href='http://fremont.alchemycs.com/wp-content/plugins/amr-ical-events-list/css/icallist.css?ver=1' type='text/css' media='all' />
<link rel='stylesheet' id='amr-ical-events-list_print-css' href='http://fremont.alchemycs.com/wp-content/plugins/amr-ical-events-list/css/icalprint.css?ver=1' type='text/css' media='print' />
<script type='text/javascript' src='http://fremont.alchemycs.com/wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src='http://fremont.alchemycs.com/wp-content/plugins/constant-contact-form/class/ccf_ajax.js?ver=3.2.1'></script>
<script type='text/javascript' src='http://fremont.alchemycs.com/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>
<script type='text/javascript' src='http://fremont.alchemycs.com/wp-content/plugins/jquery-vertical-accordion-menu/js/jquery.hoverIntent.minified.js?ver=3.2.1'></script>
<script type='text/javascript' src='http://fremont.alchemycs.com/wp-content/plugins/jquery-vertical-accordion-menu/js/jquery.cookie.js?ver=3.2.1'></script>
<script type='text/javascript' src='http://fremont.alchemycs.com/wp-content/plugins/jquery-vertical-accordion-menu/js/jquery.dcjqaccordion.2.9.js?ver=3.2.1'></script>
<script type='text/javascript' src='http://fremont.alchemycs.com/wp-includes/js/comment-reply.js?ver=20090102'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://fremont.alchemycs.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://fremont.alchemycs.com/wp-includes/wlwmanifest.xml" />
<link rel='index' title='Fremont, Seattle' href='http://fremont.alchemycs.com/' />
<link rel='next' title='Calendar' href='http://fremont.alchemycs.com/events/' />
<meta name="generator" content="WordPress 3.2.1" />
<!-- All in One SEO Pack 1.6.13.8 by Michael Torbert of Semper Fi Web Designob_start_detected [-1,-1] -->
<meta name="description" content="The Center of the Universe" />
<link rel="canonical" href="http://fremont.alchemycs.com/" />
<!-- /all in one seo pack -->
<link rel="stylesheet" type="text/css" href="http://fremont.alchemycs.com/wp-content/plugins/social-media-widget/social_widget.css" />
<link rel='stylesheet' id='wop-css' href='http://fremont.alchemycs.com/wp-content/plugins/widgets-on-pages/wop.css' type='text/css' media='all' /><!-- BEGIN Hackadelic Sliding Notes 1.6.5 -->
<style type="text/css">
.concealed { display: none }
.block { display: block }
</style>
<!-- END Hackadelic Sliding Notes 1.6.5 -->
<script src="http://fremont.alchemycs.com/wp-content/themes/center/js/jquery.flexslider.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="http://fremont.alchemycs.com/wp-content/themes/center/css/flexslider.css" />
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider();
});
</script>
</head>
, 나는 오류 메시지가 : 여기
는 순간에 서 나의 헤더 인 $ 함수되지하지만 헤더를 변경하는 경우 나중에 jQuery를 헤더에로드하려면 아코디언 메뉴 기능에 대한 유사한 오류가 표시됩니다.
이것은 아마도 간단 할 수도 있지만 문제를 파악하는 데 어려움이 있습니다.
감사합니다.
EDIT - 내가 jQuery를로드하는 곳을 실험 해본 결과, 머리말의 맨 위에있는 방식으로 작업을 진행 했으므로 맨 처음에 하나의 스크립트 만 작동한다는 점을 강조하겠습니다.
지금 jQuery는 플러그인이있는 곳입니다. 그러나이 작업을 시도하기 위해 플러그인의 jQuery 호출을 제거하고 jQuery를 헤더의 맨 위에 올렸다. 나는 여전히 같은 문제를 안고있다. 페이지의 jQuery 함수 중 하나만 작동했다. – Gwendydd
Tuncay Demirtepe가 말한 것처럼, $ jQuery 대신 $ jQuery가 사용됩니다. 어떤 이유로 jQuery 버전이 올바르지 않습니다. http://code.jquery.com/jquery-1.6.1.min.js '를 페이지에 모두 포함하면 올바르지 않습니다. 괜찮습니다. jQuery (window) ....를 사용하거나 파일을 올바른 버전 – Qurben
으로 덮어 씁니다. jQuery 코어가 jQuery와 관련이없는 파일이 실제로 올바른 순서로 존재했습니다. – Qurben