How to move slides in swiper.js?

Good day, are the sliders on page one should work so that the right part of the slide is hidden behind the screen and when you scroll to the last it needs to be shown fully and thus left which doesn't fit should be hidden behind the screen. All is well if not for the indentation that should be first on the left then scrolling to the end on the right (the left is not supposed to be)

so it should normally look like:


and so when I reached the end


Tried the change event to check if the last slide is visible and change the indents, but no event is triggered when scrolling to the floor of the slide ie half of the latter.

And the second question on a different slider, is there a way to center the slider having an even number of slides visible. (it turns out only with an odd number centeredSlides) and at the same time, that would not be a huge space left and right if it is the first or the last slide

all worked here
April 19th 20 at 12:27
1 answer
April 19th 20 at 12:29
You need the config of swiper to specify the number of visible slides and the number turned over the sliders.


Here we are interested in:

var swiper = new Swiper('.swiper-container', {
 slidesPerView: 3, // this
 slidesPerColumn: 1, // and this
 pagination: {
 el: '.swiper-pagination',
 clickable: true,

The first parameter is the number of visible slides, how much is a second visible regions to move, put auto in the first parameter and see what happens.
I do not quite understand what you are offering. I put auto and I will always have one slide shows. E. I independently during the initialization to calculate the width and ask them? and then what? I indented to be centering an even number? - amelie40 commented on April 19th 20 at 12:32
@amelie40in the documentation though, eye look, be understanding, be seen as fit in the current width. - jennings commented on April 19th 20 at 12:35
@jennings, documentation is the first where I looked. I wrote You how to actually get it (and it turns out 1 slide in auto, in the current situation) and asked accordingly the question with the calculation of the size of slides (but you're so daring).
Well I did your set the width of the slides independently, got the same picture that if I pointed a fractional quantity, to be exact - when scrolling through second to last ie half of the slide event is no no - hence the issue with the indents and remains open - amelie40 commented on April 19th 20 at 12:38
@amelie40, razbudite eyes, walk through the example from the demos of swiper and turn finally your tool called the brain.

click - jennings commented on April 19th 20 at 12:41
@jennings, so you don't take off what I need and here I am? I told you about the margins you're talking about groups here is an example collected and then what? why would I group? maybe you eyes will "rabbula"? if so clearly on the surface, collect the sample that you preform the click and now you Troll on something similar (you're smart) - amelie40 commented on April 19th 20 at 12:44
@amelie40, I would say, but better not say anything stupid status you currently earned. Scroll to the end in my example. - jennings commented on April 19th 20 at 12:47
@amelie40what question, such answer, I hope in my report the details of the question the moderators will respond soon. You don't want to understand code, dig yourself, maybe the brain is activated, problem with freelancing you on a platter no one here will give out, genius. - jennings commented on April 19th 20 at 12:50
@amelie40, your mother didn't love? ahah Sorry. - jennings commented on April 19th 20 at 12:53
@amelie40, no, it's just so offended by life I have not seen yet, go away and never come back to us "damages" is not needed. - jennings commented on April 19th 20 at 12:56
@amelie40you think I'm going to read your shit after the last to be written? Straining further. We're done. - jennings commented on April 19th 20 at 12:59

Find more questions by tags SwiperJavaScript