Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8244103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:44:09+00:00 2026-06-07T21:44:09+00:00

I’m using the plugin Tiny Carousel ( http://baijs.nl/tinycarousel ), but I can’t find a

  • 0

I’m using the plugin Tiny Carousel (http://baijs.nl/tinycarousel), but I can’t find a way to get multiple instances to work on a single page – the website seems to lack documentation on this.

I have my example up at a server. As you can see, only the first instances is working: http://irishhuddle.com/RSS/slider/slidertest.html.

How can I modify my HTML and .js file to make this work? I know similar questions have been asked… I have spend a lot of time reading them, but can’t find a way to apply the same principles to my code.

My js file:

(function($){
$.tiny = $.tiny || { };

$.tiny.carousel = {
    options: {  
        start: 1, // where should the carousel start?
        display: 1, // how many blocks do you want to move at 1 time?
        axis: 'x', // vertical or horizontal scroller? ( x || y ).
        controls: true, // show left and right navigation buttons.
        pager: false, // is there a page number navigation present?
        interval: false, // move to another block on intervals.
        animation: true, // false is instant, true is animate.
        duration: 500, // how fast must the animation move in ms?
        callback: null // function that executes after every move.
    }
};

$.fn.tinycarousel = function(options) {
    var options = $.extend({}, $.tiny.carousel.options, options);
    this.each(function(){ $(this).data('tcl', new Carousel($(this), options)); });
    return this;
};
$.fn.tinycarousel_move = function(iNum){ $(this).data('tcl').move(iNum-1,true); };

function Carousel(root, options){
    var oSelf = this;
    var oViewport = $('.viewport:first', root);
    var oContent = $('.overview:first', root);
    var oPages = oContent.children();
    var oBtnNext = $('.next:first', root);
    var oBtnPrev = $('.prev:first', root);
    var oPager = $('.pager:first', root);
    var iPageSize, iSteps, iCurrent, oTimer, bPause, bForward = true, bAxis = options.axis == 'x';

    function initialize(){
        iPageSize = bAxis ? $(oPages[0]).outerWidth(true) : $(oPages[0]).outerHeight(true);
        var iLeftover = Math.ceil(((bAxis ? oViewport.outerWidth() : oViewport.outerHeight()) / (iPageSize * options.display)) -1);
        iSteps = Math.max(1, Math.ceil(oPages.length / options.display) - iLeftover);
        iCurrent = Math.min(iSteps, Math.max(1, options.start)) -2;
        oContent.css(bAxis ? 'width' : 'height', (iPageSize * oPages.length));
        oSelf.move(1);
        setEvents();
        return oSelf;
    };
    function setEvents(){
        if(options.controls && oBtnPrev.length > 0 && oBtnNext.length > 0){
            oBtnPrev.click(function(){oSelf.move(-1); return false;});
            oBtnNext.click(function(){oSelf.move( 1); return false;});
        }
        if(options.interval){ root.hover(oSelf.stop,oSelf.start); }
        if(options.pager && oPager.length > 0){ $('a',oPager).click(setPager); }
    };
    function setButtons(){
        if(options.controls){
            oBtnPrev.toggleClass('disable', !(iCurrent > 0));
            oBtnNext.toggleClass('disable', !(iCurrent +1 < iSteps));
        }
        if(options.pager){
            var oNumbers = $('.pagenum', oPager);
            oNumbers.removeClass('active');
            $(oNumbers[iCurrent]).addClass('active');
            document.getElementById('slidenum').innerHTML = iCurrent+1;             
        }           
    };

    this.move = function(iDirection, bPublic){
        iCurrent = bPublic ? iDirection : iCurrent += iDirection;
        if(iCurrent > -1 && iCurrent < iSteps){
            var oPosition = {};
            oPosition[bAxis ? 'left' : 'top'] = -(iCurrent * (iPageSize * options.display));    
            oContent.animate(oPosition,{
                queue: false,
                duration: options.animation ? options.duration : 0,
                complete: function(){
                    if(typeof options.callback == 'function')
                    options.callback.call(this, oPages[iCurrent], iCurrent);
                }
            });
            setButtons();
        }
    };
    return initialize();
};
})(jQuery);

UPDATE: My HTML now looks like this:

<script type="text/javascript">         
    $(document).ready(function(){               

        $('#slider-code').tinycarousel({ pager: true });
        $('#slider-code2').tinycarousel({ pager: true });

    });
    </script>

<div id="slider-code">
  <div class="viewport">
    <ul class="overview">
      <li><a rel="1" class="pagenum" href="#">Hi 1</a></li>
      <li><a rel="2" class="pagenum" href="#">Hi 2</a></li>
      <li><a rel="3" class="pagenum" href="#">Hi 3</a></li>
      <li><a rel="4" class="pagenum" href="#">Hi 4</a></li>
      <li><a rel="5" class="pagenum" href="#">Hi 5</a></li>
      <li><a rel="6" class="pagenum" href="#">Hi 6</a></li>       
      </ul>
  </div>

  <ul class="pager">
   <li><a href="#" class="buttons prev">left</a></li>
  <li id="slidenum">1</li><li> / 6</li>
  <li><a href="#" class="buttons next">right</a></li>
  </ul>
</div>
<div id="slider-code2">
  <div class="viewport">
      <ul class="overview">
      <li><a rel="1" class="pagenum" href="#">Hi 1</a></li>
      <li><a rel="2" class="pagenum" href="#">Hi 2</a></li>
      <li><a rel="3" class="pagenum" href="#">Hi 3</a></li>
      <li><a rel="4" class="pagenum" href="#">Hi 4</a></li>
      <li><a rel="5" class="pagenum" href="#">Hi 5</a></li>
      <li><a rel="6" class="pagenum" href="#">Hi 6</a></li>       
      </ul>
  </div>

  <ul class="pager">
   <li><a href="#" class="buttons prev">left</a></li>
  <li id="slidenum">1</li><li> / 6</li>
  <li><a href="#" class="buttons next">right</a></li>
  </ul>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:44:11+00:00Added an answer on June 7, 2026 at 9:44 pm

    You just have to call $('#slider1').tinycarousel(); on your other slider

    In you case, something like: $('#slider-code').tinycarousel(); and $('#slider-code2').tinycarousel();

    that should be all

    EDIT

    Just a quick fix for your html:

    <div id="slider-code">
      <div class="viewport">
        <ul class="overview">
          <li><a rel="1" class="pagenum" href="#">Hi 1</a></li>
          <li><a rel="2" class="pagenum" href="#">Hi 2</a></li>
          <li><a rel="3" class="pagenum" href="#">Hi 3</a></li>
          <li><a rel="4" class="pagenum" href="#">Hi 4</a></li>
          <li><a rel="5" class="pagenum" href="#">Hi 5</a></li>
          <li><a rel="6" class="pagenum" href="#">Hi 6</a></li>       
          </ul>
      </div>
    
      <ul class="pager">
       <li><a href="#" class="buttons prev">left</a></li>
      <li id="slidenum">1</li><li> / 6</li>
      <li><a href="#" class="buttons next">right</a></li>
      </ul>
    </div>
    <div id="slider-code2">
      <div class="viewport">
          <ul class="overview">
          <li><a rel="1" class="pagenum" href="#">Hi 1</a></li>
          <li><a rel="2" class="pagenum" href="#">Hi 2</a></li>
          <li><a rel="3" class="pagenum" href="#">Hi 3</a></li>
          <li><a rel="4" class="pagenum" href="#">Hi 4</a></li>
          <li><a rel="5" class="pagenum" href="#">Hi 5</a></li>
          <li><a rel="6" class="pagenum" href="#">Hi 6</a></li>       
          </ul>
      </div>
    
      <ul class="pager">
       <li><a href="#" class="buttons prev">left</a></li>
      <li id="slidenum">1</li><li> / 6</li>
      <li><a href="#" class="buttons next">right</a></li>
      </ul>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.