2015-02-07 20 views
1

我使用1.9.1.0和自定義主題(主題購物者)Magento的1.9.1.0 elevateZoom未加載/工作第一次在自定義主題

我抄media.phtml和app.js等(從RWD)變焦目的

變焦無法加載第一次,但是當我在縮略圖點擊(詳細視圖)elevateZoom正確加載還我發現peoduct的第二圖像加載第一

很明顯,雖然使用自定義我主題我必須手動執行兩件事 1)在產品詳細信息頁面中,第一張圖像(基本圖像)將首先加載 2)和elevateZoom還裝載

但我沒能找出我的jQuery更改代碼的頁面

回答

0

嘗試對這個文件一看:(/護膚/前端/ RWD /默認/ JS /app.js)並查找image.elevateZoom();並檢查它是否已被註釋,如果是,請刪除註釋並再次運行它。

0

對於任何人誰已經擁有noConflict設置,並且仍然出現問題在運行,我終於找到了a ticket raised on Github

// First call elevateZoom 

$j(document).ready(function() {  
    $j('.product-image-thumbs').attr('id', 'zoomGallery'); 

    //initiate the plugin and pass the id of the div containing gallery images 

    $j("#image-main").elevateZoom({gallery:'zoomGallery', cursor: 'pointer', galleryActiveClass: 'active', imageCrossfade: true, loadingIcon: 'http://www.elevateweb.co.uk/spinner.gif'}); 

//pass the images to Fancybox 

$j("#image-main").bind("click", function(e) { 
    var ez = $j('#image-main').data('elevateZoom');  
    $j.fancybox(ez.getGalleryList()); 
    return false; 
}); 

// after click you need to remove the current zoom 

$j(".product-image-thumbs li img").click(function(){ 
    $j("#image-main").attr("src", $j(this).attr("data-main-image-src")); 
    $j('.zoomContainer').remove(); 
    $j('#image-main').removeData('elevateZoom'); 

// and then call it again 

$j('#image-main').elevateZoom({ 
    gallery: 'more-vies', 
    lensSize: 200, 
    cursor: 'pointer', 
    galleryActiveClass: 'active', 
    imageCrossfade: true, 
    scrollZoom : true, 
    responsive: true 
    }); 
}); 
}); 
+0

請不要發佈相同的答案多個問題該解決方案。發佈一個很好的答案,然後投票/標記以重複關閉其他問題。如果問題不重複,*定製您的問題答案。* – Rizier123 2016-03-15 10:08:57

相關問題