Note that there are some explanatory texts on larger screens.

plurals
  1. POScript error, where to add if
    primarykey
    data
    text
    <p>I have this script, but in the IE8 i get error: <em>'photos are undiefienied'</em>, where is the if to do to fix this problem:</p> <pre><code> /* * Author: Marco Kuiper (http://www.marcofolio.net/) */ window.addEvent('load', function() { jQuery("#slideimg1").css({ "background-image" : "url("+url+"/" + photos[0].image + ")" }); if(photos.length &gt;= 2){ jQuery("#slideimg2").css({ "background-image" : "url("+url+"/" + photos[1].image + ")" }); } // Backwards navigation jQuery("#cp-back").click(function() { //stopAnimation(); navigate("back"); }); // Forward navigation jQuery("#cp-next").click(function() { //stopAnimation(); navigate("next"); }); //jQuery("#preload").hide(); var activeContainer = 1; var currentImg = 0; var animating = false; var first = false; var navigate = function(direction) { // Check if no animation is running. If it is, prevent the action if(animating) { return; } // Check which current image we need to show if(direction == "next") { currentImg++; if(currentImg == photos.length + 1) { currentImg = 1; } } else { currentImg--; if(currentImg == 0) { currentImg = photos.length; } } // Check which container we need to use var currentContainer = activeContainer; if(activeContainer == 1) { activeContainer = 2; } else { activeContainer = 1; } showImage(photos[currentImg - 1], currentContainer, activeContainer); }; var currentZindex = -1; var showImage = function(photoObject, currentContainer, activeContainer) { //alert(currentContainer); animating = true; // Make sure the new container is always on the background currentZindex--; if(!first){ //alert(first); //alert("aa"); // Set the background image of the new active container jQuery("#slideimg" + activeContainer).css({ "background-image" : "url("+url+"/" + photoObject.image + ")" //"display" : "block", //"z-index" : currentZindex }); // Fade out the current container // and display the header text when animation is complete jQuery("#slideimg" + currentContainer).fadeOut(effectTime,function() { animating = false; }); jQuery("#slideimg" + activeContainer).fadeIn(effectTime); //first = false; }else{ //alert("bbb"); jQuery("#slideimg" + activeContainer).fadeOut(effectTime,function() { animating = false; }); jQuery("#slideimg" + currentContainer).fadeIn(effectTime); first = false; //animating = false; } }; var stopAnimation = function() { // Clear the interval clearInterval(interval); }; // We should statically set the first image navigate("next"); if(photos.length &gt; 1){ // Start playing the animation interval = setInterval(function() { navigate("next"); }, slideshowSpeed); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload