Jump to content
  • 0

Skrypt Js W .tpl


dscontact

Question

Witam

 

Chcailbym wstawic slider na strone. Wykorzystuje on ponizszy skrypt. Dziala mi bez problemow w pliku HTML, natomiast gdy dodam go do pliku .tpl prestashop nie dziala -> Blad serwera 500.

Prosze o pomoc, dziekuje.

 

 

<script type="text/javascript" >
var filetoload = [];var functoload = [];function loadScript(url, func) {var o = {url  : url,func : func};filetoload.push(o);}function loadFunc(func) {functoload.push(func);}loadScript("js/jquery-1.7.2.min.js");loadScript("js/jquery.backgroundpos.js");loadScript("js/functionf4f8.js?1442482408");document.cookie='rwd_resolution='+Math.max(screen.width,screen.height)+'; path=/';//]]>
</script> 
 
<script type="text/javascript" >//<![CDATA[
function loadScripts(counter, callback){'use strict';if (!filetoload.length) {return;}var script = document.createElement("script"), i;script.type = "text/javascript";if (script.readyState){  //IE
script.onreadystatechange = function(){if (script.readyState == "loaded" ||script.readyState == "complete"){script.onreadystatechange = null;if (counter+1<filetoload.length) {loadScripts(counter+1, callback);} else {if (callback == 'function') {callback();}for(i=0;i<functoload.length;i++) {functoload();[spam-filter]if (typeof(filetoload[counter].func) == 'function') {filetoload[counter].func();[spam-filter]};} else {  //Others
script.onload = function(){if (counter+1<filetoload.length) {loadScripts(counter+1, callback);} else {if (callback == 'function') {callback();}for(i=0;i<functoload.length;i++) {functoload();[spam-filter]if (typeof(filetoload[counter].func) == 'function') {filetoload[counter].func();[spam-filter];}script.src = filetoload[counter].url;document.getElementsByTagName("head")[0].appendChild(script);}loadScripts(0);//]]>
</script> 
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...