我已經實現ZeroClipboard功能上我們的網站 - http://couponvoodoo.com/rcp/Jabong.com/coupons-offers?field_offer_type_tid=All 我使用Drupal的7ZeroClipboard沒有對網站的移動版本工作
它工作正常的桌面版本,但不工作的移動版現場。 我已經把下面的代碼在頁腳:
<script type="text/javascript">
copy_coupon_footer();
function copy_coupon_footer(){
var divArray = document.getElementsByClassName("unlock_best_coupon");
for (var i = 0, len = divArray.length; i < len; ++i) {
var offer_type = divArray[i].getAttribute('data-clipboard-text');
// alert('offer_type '+offer_type);
try{
var id = divArray[i].getAttribute('id');
var client = new ZeroClipboard(document.getElementById(id), {moviePath:'/moviePath' });
client.on('load', function(client) {
client.on('complete', function(client, args) {try{
var url = this.getAttribute("href");
var coupon_code = url.split('&c=')[1].split('&')[0];
this.innerHTML = coupon_code;
var classname = this.className+' copied_coupon';
this.setAttribute("class",classname);
// window.open(url,'_blank');
window.location.href = url;
}catch(e){}
});
});
}catch(e){alert(e.message);}
}
return false;
}
</script>
它需要瀏覽器上的Flash插件才能正常工作。 – techfoobar
@techfoobar你能告訴我如何檢查Flash插件是否安裝在移動設備上(PS:我可以在瀏覽器上查看youtube視頻) – user2129794
此頁面會告訴你安裝的plash插件的版本(如果已安裝) - http://www.adobe.com/software/flash/about/ – techfoobar