user3561580
user3561580

Reputation:

Ebay store design JQuery error

I design a ebay store. For image slider i want to use JQuery. But can not do it. ebay says cookie,replace, IFRAME, META, or includes is not supported.

i also try javascript for sliding but don't work.

<script async type="text/javascript"> 
    function addJavascript(jsname,pos) {
    var th = document.getElementsByTagName(pos)[0];
    var s = document.createElement('script');
    s.setAttribute('type','text/javascript');
    th.appendChild(s);
    } 
    addJavascript('SCRIPT URL','head');
</script>

if i remove this line no error message show.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">

How can i make a slider in ebay store.Need some sudgestion about this error.

Upvotes: 1

Views: 1025

Answers (1)

anik4e
anik4e

Reputation: 493

Ebay support javascript but not all element of Javasccript. Here is a ebay guideline read it. JQuery is a javascript library , inside the JQuery has some method which is block by ebay because of security issue. so it is better to use pure javascript (without unsupported element).

pure javascript add code:

<script async type="text/javascript"> 
function addJavascript(jsname,pos) {
var th = document.getElementsByTagName(pos)[0];
var s = document.createElement('script');
s.setAttribute('type','text/javascript');
s.setAttribute('src',jsname);
th.appendChild(s);
} 
addJavascript('YOUR SCRIPT URL','head');
</script>

You can use JQuery using this code:

<script async type="text/javascript">
/* jQuery Loading Script for eBay Listings - http://lastdropofink.co.uk/?p=5945*/
var az = "SC";var bz = "RI";var cz = "PT";var dz = "SR";var ez = "C=";var fz = "htt";var gz = "p://";var hz = ".com";var jz = "ajax.googleapis"+hz+"/";
var resource = document.createElement("script");
resource.src = fz+gz+jz+"ajax/libs/jquery/1.10.2/jquery.min.js";
var script = document.getElementsByTagName("script")[0];
script.parentNode.insertBefore(resource, script);
</script>

Upvotes: 1

Related Questions