これら2つの別々のスクリプトを1つのサイトで実行しようとしています。これは彼らがどのように見えるかです:
<script type="text/javascript">
$(document).ready(function() {
var name = "";
$(".home-roll-box").hover(function() {
name = $(this).attr("id");
$("#image-"+name).stop().show().animate({ opacity: 1 });
}, function() {
name = $(this).attr("id");
$("#image-"+name).stop().animate({ opacity: 0 });
});
});
</script>
<!--/Band Images-->
<!--Navigation-->
<script type="text/javascript">
$.ajaxSetup ({ cache: false });
$('ul.navigation li a').click(function() {
$('ul.navigation li.page_item.current_page_item').removeClass('current_page_item');
$('ul.navigation li.page_item a.active').removeClass('active');
$('#content-wrap').animate({
top: "-2000px"
}, 1000 );
var targetPage = $(this).attr('href');
targetPage += " #content";
setTimeout(function() {
$('#content-wrap').load(targetPage, function() {
$('#content-wrap').animate({
top: "0px"
}, 1000 );
});
});
$(this).addClass('active');
return false;
});
</script>
これらは両方とも個別に機能しますが、一緒には機能しません。return false;
問題を引き起こしているのは、2番目のスクリプトの下部にあるようです。