We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    Hi everyone,
    I have a maxigallery using smoothgallery. I want to avoid the need to click the "Picture" link to open the carousel. My target is to get a single page where the carousel is on bottom and pic is above. I managed using the &smoothgallery_carouselMinimizedHeight and some css to do that, however the carousel effect is triggered only after I click the "pictures" link.

    I found the toggleCarousel: function in Jon’s code but I have no idea how to modify it for my needs.
    Will appreciate any help!
      • 7923
      • 4,213 Posts
      You can write extra JS code to your page that is run when document is ready and call that toggleCarousel() function to make the carousel open. Or you could do external carousel and it will be always open.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 27330
        • 884 Posts
        Thank you very much for the reply doze.

        I’m a n00b so coding a separate JS for the effect is out of my capabilities sad

        However I did find a direction on smoothgallery forums

        which looks like this
        /* trying to enable on mouse hover */
        		 this.carouselBtn.addEvent(
                        'mouseover',
                        function () {
                            this.carouselContainer.clearTimer();
                            this.toggleCarousel();
                        }.bind(this)
                    );


        this works when I hover the pictures link, if I could only make it to work by hovering the carousel itself instead of the link it’ll do just what I wanted.

        So I tried changing to line from this.carouselBtn.addEvent to carouselContainerElement and carouselContainer but that didn’t help.

        I’m stuck at this point. if you can give me more info on how to write the JS to toggle the carousel onload it’ll be awesome.
          • 27330
          • 884 Posts
          ok mootools docs for the rescue.

          /*enable carousel on load */
          	  window.addEvent('domready', function() {
              this.carouselContainer.clearTimer();
                              this.toggleCarousel();
                          }.bind(this)
                      );  
            • 41780
            • 1 Posts
            Good. a query.
            I'm driving the 1.2 that came vercion in the default template.

            and the solution that I precenta works.

            as I can do to make the carousel, not disappear, stay static.