Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carousel not works with one more instance at same page #65

Open
davirs opened this issue May 6, 2013 · 2 comments
Open

carousel not works with one more instance at same page #65

davirs opened this issue May 6, 2013 · 2 comments

Comments

@davirs
Copy link

davirs commented May 6, 2013

this carousel not works with more then one instance of carousel.

for example, if you have 3 carousels at your page, only the first carousel works. The other two execute the commands of the first instance only.. prev and next button for example...

@rajanRawat
Copy link

that is beacuase in the CSS and javascripts they use id's as "#carousel".

try changing all such instances into classes ".carousel". It should work then.

@romuloinnocencio
Copy link

Like said rajanwat, yes it works. Here i have 3 instances os them and works fine with class.

var $wrapper = $('.js-rcarousel');

        $wrapper.each(function () {

            var options = {
                width: 140,
                margin: 38,
                visible: 4,
                step: 1,
                orientation: "horizontal"
            }

            var type = $(this).attr('data-type');

            if (type == 'galeries') options.height = 135;
            else if (type == 'movies') options.height = 163;

            else if( type == 'eventos' ){
                options = {
                    width: 470,
                    margin: 0,
                    height: 137,
                    visible: 4,
                    step: 1,
                    orientation: 'vertical'
                }
            }

            $(this).rcarousel(options);

        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants