Support » Plugin: JJ NextGen JQuery Carousel » [Plugin: JJ NextGen JQuery Carousel] Fix for disappearing images problem

  • I was having an issue with this plugin cutting off an image after the carousel ran for about 20 seconds, then eventually after several minutes all images would disappear.

    The fix is to get rid of a width hack in the plugin (not sure why it is there) and remove the ‘visible’ option:

    Open: /plugins/jj-nextgen-jquery-carousel/includes/jj-nextgen-jquery-carousel.php

    Find and delete these lines (starting at line 266):

    // Hack to make jcarousel work with gaps
        if($width != '') {
          $output .= "\n  jQuery('ul#" . $html_id . " li').width(" . $width . ");";

    Find and delete this line (line 246):

    if($visible != "") { $javascript_args[] = "visible: " . $visible; }

Viewing 15 replies - 1 through 15 (of 15 total)
  • fyi your line 246 was line 244 (just so others might have the same situation0



    Thank you for this! I was tearing my hair out over this problem

    Thank you!
    It was definitely a bug.

    Thank you!!

    Issue fixed!!

    Many thanks!!!
    Works fine thanks to you !

    When I use the solution from skyer2000 the carousel is on top op each other instead of beside each other and the rest of the website lay-out is not shown.

    I don’t know if this is something that has been updated in the plugin’s latest release or not but I am unable to find those lines in the code…at least the width part, the visible part I am finding up by line 487.

    Either way, I am still having issues with my scroller where I have 13 images in the gallery with 10 showing on the page. Once I scroll past the 13th image using the arrows it starts putting blank spaces instead of wrapping the images. I have tried setting the wrap to both and circular and neither work, have also tried a .js fix which involved changing some of the math functions to null, and that didn’t work either.

    Anyone else still having this problem or have a solution I can try?

    I have the same problem, I have four images, and after 4/5 clicks it gives me a white space, after that it freaks out. Using wrap=”both” does not work as it does for some people, also the solution at the top of this thread does not work for me.

    Hopefully it is widespread enough where someone will have a solution. If I find one I will post it here as well.

    I’ve read tons of so called solutions for this, but none of them actually work. This plugin is huge as far as I can see, there is no other like it. But still there looks to be no fix available.

    I stopped looking for a fix, now I’m looking for another plugin to be honest.

    I got it working a while ago but I forgot to place my solution, which is a part of the solution by skyer2000. I just commented out line 246 (with me 244) on jj_ngg_jquery_carousel.

    if($visible != "") { $javascript_args[] = "visible: " . $visible; }

    After this the slider works perfectly for me. I just have to remember not to update the plugin. Hope this will help someone but all the credits goes to skyer2000.

    That’s the first solution of this thread. I tried that but it didn’t help. And it is on line 475 of my version of the script. I don’t know if that is because for some reason mine is double spaced or if it is a newer version. Either way, commenting out that line isn’t helping.

    Same for me. I tried to return the next() function when the carousel reached the end. It works, not more weird wrapping, BUT still have a problem, the divs keeping the images keep getting messed up.

    If you use greasemonkey or google inspector you should try looking at what happens when you use the next function. it acts realy weird.

    Still trying to fix this thing because no other plugins do the same for me.

    Edit: Okay I have a temp fix for now, it is not perfect, but does fix the weird image changing order thing for me.

    I changed the function next() and prev() to normal if statements, then added something:


    next: function () {
                //this.tail !== null && !this.inTail ? this.scrollTail(false) : this.scroll((this.options.wrap == "both" || this.options.wrap == "last") && this.options.size !== null && this.last == this.options.size ? 1 : this.first + this.options.scroll)
            	if (this.tail !== null && !this.inTail) {
            	} else {
            		// I view three images at once, so if this.first + 2 == the size it means the
            		// last 3 pictures are displayed. Change the 2 to your amount of pictures that
            		// is showed MINUS 1. So if in your sc you use visible=5, use 4.
            		if (this.first + 2 == this.options.size) {
            		if ((this.options.wrap == "both" || this.options.wrap == "last") && this.options.size !== null && this.last == this.options.size) {
            		} else {
            			this.scroll(this.first + this.options.scroll)


    prev: function () {
                //this.tail !== null && this.inTail ? this.scrollTail(true) : this.scroll((this.options.wrap == "both" || this.options.wrap == "first") && this.options.size !== null && this.first == 1 ? this.options.size : this.first - this.options.scroll)
                if (this.tail !== null && this.inTail) {
                } else {
                	if (this.first == 1) {
                	if ((this.options.wrap == "both" || this.options.wrap == "first") && this.options.size !== null && this.first == 1) {
                	} else {
                		this.scroll(this.first - this.options.scroll)

    This does not fix it 100%, but maybe someone has some use of it.

    The fix mentioned by skyer2000 seemed to work for me. I had many images scrolling showing 5 at a time, and eventually if you looped through it a few times it would only show 4 images. When I made the changes skyer2000 mentioned everything seems to be working smoothly. Thanks!!

    thank you skyer2000, your solution worked great! I had 6 images, 4 being shown at one time, and after a few seconds there would be 3 images at a time, then two, after 30 seconds on safari, there was only 1 image showing, and after about 10 seconds on Firefox.
    thanks again!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: JJ NextGen JQuery Carousel] Fix for disappearing images problem’ is closed to new replies.