CSS-Tricks / AnythingSlider

A jQuery Slider plugin for anything.
http://css-tricks.github.io/AnythingSlider/
GNU Lesser General Public License v3.0
1.15k stars 380 forks source link

changeBy Option is not working... #539

Closed OrangeWacko closed 11 years ago

OrangeWacko commented 11 years ago

What am I doing wrong?... I am displaying Multiple (2) but I would like to scroll with 2, changeBy is not working at all no matter what I put in there... Any help?

OrangeWacko commented 11 years ago

Here is my activation script:

jQuery('#event-slider').anythingSlider({
        showMultiple:2,
        changeBy: 2,
        buildArrows :false,
        buildStartStop :false,
        resizeContents: false,
        startPanel: 1,
        hashTags: false,
});

here is the link to the demo: http://www.wdmlibrary.org.demo4.flyinghippo.com/

JamyGolden commented 11 years ago

I know this doesn't answer exactly what you're asking, but have you considered putting the one slide with the content <h4>Check it out!</h4> inside the same slide as the book image? That way you wouldn't have to show multiple slides and you also wouldn't have to force a changeBy 2.

OrangeWacko commented 11 years ago

I think that would have been a good solution except we are running loop for the custom post types that have either text or image and some text so they might be in an order school wants to put them, individually. But good solution if this wont get fixed :) thanks

JamyGolden commented 11 years ago

No problem :) It looks like changeBy only takes affect when a user clicks the next/prev buttons or the slider slides automatically, both of which look like have been disabled in your options.

I'd say you have 3 obvious options:

  1. Enable the next/prev slider buttons and disable the pagination
  2. Turn the 2 slides into 1 slide via the backend
  3. Turn the 2 slides into 1 slide with javascript before initializing anythingslider
Mottie commented 11 years ago

There is a 4th option ;)

Hide the even navigation links using this css:

.anythingSlider-default .anythingControls ul li:nth-child(even) {
    display: none;
}

Or, this could also be done by doing some fancy stuff in the navigationFormatter function.

OrangeWacko commented 11 years ago

Nicely done Mottie :) sneaky but it's fast solution. My fear is the IE testing we have to do for this school website, because of the CSS3 selector for EVEN but that's another story...

@Jamy @Mottie thanks for help guys, I will actually try the pagination and see if that will do it, also

-peace