Blueie Posted March 14, 2015 Share Posted March 14, 2015 Hello I am getting the above JavaScript error with fading images in an ASP.NET project. I do not know what causes the error or how to correct it. There are no images on the Web page at the moment, only a link to the JavaScript file that contains the error below: function gallery() { //if no images have the show class, grab the first image var current = ($('ul.slideshow li.show')? $('ul.slideshow li.show') : $('#ul.slideshow li:first')); // trying to avoid speed issue if(current.queue('fx').length == 0) { // get the next image, if it reached the end of the slideshow, rotate it back to the first image var next = ((current.next().length) ? ((current.next().attr('id') == 'slideshow-caption')? $('ul.slideshow li:first') :current.next()) : $('ul.slideshow li:first')); // get the next image caption var desc = next.find('img').attr('alt'); // set the fade in effect for the next image, show class has higher z-index next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000); // hide the caption first, and then set and display the caption $('#slideshow-caption').slideToggle(300, function () { $('#slideshow-caption p').html(desc); $('#slideshow-caption').slideToggle(500); }); // hide the current image current.animate({opacity: 0.0}, 1000).removeClass('show'); }} Thank you for any advice. Blueie Link to comment Share on other sites More sharing options...
Ingolme Posted March 14, 2015 Share Posted March 14, 2015 That means that current.queue('fx') is not returning anything. Perhaps because current is not referring to any elements. Link to comment Share on other sites More sharing options...
Blueie Posted March 15, 2015 Author Share Posted March 15, 2015 Hello Foxy Thank you for your reply. So once I upload a few photos to be faded. that error may go away? Thanks again. Link to comment Share on other sites More sharing options...
Ingolme Posted March 15, 2015 Share Posted March 15, 2015 I would test to make sure and not just assume it will work. I would also make sure that the program is prepared for that situation. Link to comment Share on other sites More sharing options...
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 accountSign in
Already have an account? Sign in here.
Sign In Now