javascript - ZeroClipboard not working on mobile version of the site -
I have implemented xerochlord functionality on our site - I am using Drupal-7
It is working fine on the desktop version but the mobile version of the site is not working. I've put the following code in the footer:
& lt; Script type = "text / javascript" & gt; Copy_coupon_footer (); Function copy_coupon_footer () {var divArray = document.getElementsByClassName ("unlock_best_coupon"); (Var offer_type = divArray [i] .getAttribute ('data clipboard-text'); // alert ('offer_type') for (var i = 0, len = divArray.length; i & lt; len; ++ i) + Offer_type); Try {var id = divArray [i] .getAttribute ('id'); Var client = new zero copyboard (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 (' & amp; amp; c = ') [1] .split (' & amp; ') [0]; this.innerHTML = coupon_code; var classname = this.className +' copyied_coupon '; this.setAttribute ("class", classname); // Window .open (url, '_ blank'); window.location.href = url;} catches (e) {}});});} hold (e) {f} ETemount (e.message);}} return false;}
ZeroClipboard requires Adobe Flash to display the clipboard function and thus it will not work in any browser that does not have Adobe Flash installed
Therefore, since Adobe Flash (only a few Old Android device), there are hardly any mobile devices, it will not work on mobile devices.
When I do not need Adobe Flash on an optional ZeroClipboard, no other solution has been given.
Comments
Post a Comment