過去数時間、ウェブサイトでスライダーを実行しようとしてきましたが、これまでのところ、ぐるぐる回っています。
Wordpress サイトのページ読み込みを高速化するために、head.js を使用してすべてのスクリプトを非同期に読み込もうとしています。
Firfox や Chrome などではすべて正常に動作しますが、いつものように IE はボールをプレーしたくないだけです。私が現在持っているものを簡単に紹介します。
<!-- within HEAD -->
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/head.js"></script>
<script type="text/javascript">
head.js(
"https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js",
"https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js",
"<?php bloginfo('template_directory'); ?>/js/crosslide.js",
"<?php bloginfo('stylesheet_directory'); ?>/js/mobile-cookies.js",
"<?php bloginfo('stylesheet_directory'); ?>/js/superfish.js",
"<?php bloginfo('stylesheet_directory'); ?>/js/hoverIntent.js",
"<?php bloginfo('template_directory'); ?>/js/google-analytics.js",
"<?php bloginfo('template_directory'); ?>/js/track-events.js"
);
</script>
<!---end HEAD -->
<!-- Within BODY wherever the slider should appear-->
<script type="text/javascript">
jQuery(document).ready(function ($) {
$(function(){
$('.fading').crossSlide({
sleep: 4,
shuffle: true,
fade: 1
}, [
{ src: 'http://www.example.co.uk/wp-content/themes/royalanlochan/images/Banner/1.jpg' },
{ src: 'http://www.example.co.uk/wp-content/themes/royalanlochan/images/Banner/2.jpg' }
]);
});
});
</script>
<!-- end BODY-->
スライダーがIEに表示されず、IEでF12(開発者ツール)を使用すると、取得し続けます
Object doesn't support this property or method
jQueryについて私が知っていることと、広範なグーグルから収集したことから、$変数との何らかのjQueryの競合が原因でこのエラーがスローされていると思いますが、それは私の知識の範囲です。
何か案は?