하지 나는 페이지에 이러한 오류를 모두 얻을 :jQuery를 Cufon 정의 및 형식 오류
ReferenceError가 : Cufon은
을 정의되지 않은형식 오류 : $ ("main_equal2.") equalHeights 함수
없습니다.나는 simplemarket 테마로 Wordpress를 사용하고 있습니다. 모든 스크립트 파일은 header.php에로드되며 아래에 포함되어 있습니다.
누구든지 내 문제를 해결할 수 있습니까? 당신은 워드 프레스에로
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url') ?>/scripts/cufon.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url') ?>/scripts/avenir_400.font.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url') ?>/scripts/equal_heights.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url') ?>/scripts/html5shiv.js"></script>
<script type="text/javascript" src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
<!--<script src="<?php bloginfo('template_url') ?>/scripts/googlemapselector.js"></script>-->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<!--[if lte IE 8]>
<script src="<?php bloginfo('template_url') ?>/scripts/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
<script type="text/javascript">
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(40.718510, -73.774080);
var mapOptions = {
zoom: 13,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canvas_sat"), mapOptions);
var image = 'images/school_icon.png';
var marker = new google.maps.Marker({
map: map,
position: latlng,
animation: 'drop',
icon: image
});
}
$(document).ready(function(){
$(".main_equal2").equalHeights();
$(".main_equal3").equalHeights2();
$(".main_equal4").equalHeights3();
});
jQuery(document).ready(function(){
// Anything classed with .collapse should be collapsed as well by default
i = 0;
jQuery('.collapse').each(function() {
this.id = 'collapser-' + Math.floor(Math.random() * (Math.random() * 10000));
jQuery(this).wrap('<div id="' + this.id + '-expand"></div>');
if(i == 0) {
jQuery(this).before('<a class="dark_stripe" id="' + this.id + '-link" href="#" onclick="javascript:jQuery(\'#' + this.id + '\').slideToggle();return false;">Click</a>');
i++;
} else if(i == 1) {
jQuery(this).before('<a class="light_stripe" id="' + this.id + '-link" href="#" onclick="javascript:jQuery(\'#' + this.id + '\').slideToggle();return false;">Click</a>');
i = 0;
}
jQuery(this).wrap('<div></div>');
jQuery(this).slideUp();
});
jQuery(".athletics_map_location").click(function() {
var address = $(this).attr('value');
var image = 'http://www.bigideaadv.com/tmla/wp-content/themes/simplemarket/images/school_icon.png';
geocoder.geocode({ 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
animation: 'drop',
position: results[0].geometry.location,
icon: image
});
/*shadow: Symbol({
fillColor: '#00ff00'
}),*/
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
});
jQuery(".athletics_map_location2").click(function() {
var address = $(this).attr('value');
var image = 'http://www.bigideaadv.com/tmla/wp-content/themes/simplemarket/images/facility_icon.png';
geocoder.geocode({ 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
animation: 'drop',
position: results[0].geometry.location,
icon: image
});
/*shadow: Symbol({
fillColor: '#00ff00'
}),*/
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
//FONT REPLACEMENT FOR RIGHTS PROTECTED AVENIR FONT
Cufon.replace('#athletics_menu ul#menu-athletics-menu a:link, #athletics_menu ul#menu-athletics-menu a:visited, #athletics_menu ul#menu-athletics-menu a:hover, #athletics_menu ul#menu-athletics-menu a:active');
Cufon.replace('#athletics_sidebar_right aside.widget h3, #athletics_sidebar_bottom_left aside.widget h3, #athletics_sidebar_bottom_center aside.widget h3, .page-template-template-athletics-sports-page-php aside.widget h3');
});
$(function() {
// initialize scrollable
var root = $(".scrollable").scrollable({circular: true, speed: 1000}).autoscroll({ autoplay: true, interval: 5000 });
//$(".scrollable").scrollable();
});
});
</script>
스크립트 디렉토리에'cufon.js'라는 파일이 있는지 확인하십시오. Cufon의 새 버전으로 파일을 업데이트하십시오. –