2013-10-01 123 views
0

jQuery不會在Internet Explorer 10中加載頁面時加載,並且必須按(F5)/或刷新頁面才能加載。在Chrome和Firefox上,它可以完美加載;這只是IE導致的問題。這似乎是像jQzoom導致的問題,因爲唯一的腳本無法加載頁面加載。在Internet Explorer 10上加載頁面時jQuery不加載;只在頁面刷新時加載(F5)

jQzoom腳本:

$(document).ready(function() { 
$('.jqzoom').jqzoom({ 
     zoomType: 'standard', 
     lens:true, 
     preloadImages: false, 
     alwaysOn:false 
    }); 
}); 

功能,我使用所有jQueries鏈接:

'jQzoom2' 是上面提到的腳本:

function et_load_lucid_scripts(){ 
if (!is_admin()){ 
    $template_dir = get_template_directory_uri(); 
    wp_enqueue_script('sc1', $template_dir . '/js/scroll/jquery-1.3.2.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('sc2', $template_dir . '/js/scroll/scroll-startstop.events.jquery.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('jqzoom2', $template_dir . '/js/jq/jqzoom2.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('navigation', $template_dir . '/js/navigation/jquery1.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('navigation1', $template_dir . '/js/navigation/nav_touch.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('jqzoom1', $template_dir . '/js/jq/jquery.jqzoom-core.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('tracklist', $template_dir . '/js/test/jquery.dataTables.min.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('new_tab', $template_dir . '/js/test/newtab.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('html5', $template_dir . '/js/html5.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('superfish', $template_dir . '/js/superfish.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('flexslider', $template_dir . '/js/jquery.flexslider-min.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('fitvids', $template_dir . '/js/jquery.fitvids.js', array('jquery'), '1.0', true); 
    wp_enqueue_script('custom_script', $template_dir . '/js/custom.js', array('jquery'), '1.0', true); 
} 
if (is_singular() && get_option('thread_comments')) wp_enqueue_script('comment-reply'); 

    $et_gf_enqueue_fonts = array(); 
    $et_gf_heading_font = sanitize_text_field(et_get_option('heading_font', 'none')); 
    $et_gf_body_font = sanitize_text_field(et_get_option('body_font', 'none')); 

    if ('none' != $et_gf_heading_font) $et_gf_enqueue_fonts[] = $et_gf_heading_font; 
    if ('none' != $et_gf_body_font) $et_gf_enqueue_fonts[] = $et_gf_body_font; 
    if (! empty($et_gf_enqueue_fonts)) et_gf_enqueue_fonts($et_gf_enqueue_fonts); 
} 

add_action('wp_enqueue_scripts', 'et_load_lucid_scripts'); 
+0

你可以把一個jsfiddle(http://jsfiddle.net)來演示這個問題嗎?這將使調試更容易。 –

+0

嗨,最高,謝謝你的回覆..我試圖將腳本添加到JS,但他們不在JS中工作,可能是由於多個腳本和我正在使用的鏈接。有沒有辦法強制IE重新加載/刷新特定頁面?這將解決問題。謝謝:) – pv619

+0

任何幫助plzzzzz?一直試着讓這個工作好幾個小時plzzz – pv619

回答

1

添加<元http-equiv =「X-UA-Compatible」content =「IE = 10」>進入你頁面的頭部。

這也可能解決其他js問題與內容滑塊和圖像。乾杯