G
G
GreenMan18992017-08-23 16:57:56
JavaScript
GreenMan1899, 2017-08-23 16:57:56

Is it possible to get rid of duplicate slides in Swiper without disabling looping?

For the looping effect, the slider creates copies of the slides. But my slides are made up of items that people need to add to their cart. And if they send the same goods to the basket several times, it will be bad.
I need these copies not to exist, or to be inaccessible to the client visiting the site. But at the same time, you need to leave the obsession.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
alexalexes, 2019-04-28
@medbrat69

xhr.send(file); // отправили файл аяксом, мы молодцы.
    document.getElementById('uploadDropForm').submit(); // зачем-то еще отправляем форму традиционным способом, наверное тут мы что-то делаем не так.???

You also need to answer the question "Was there a boy?", that is, what you pass to the send method:
...
console.log(file);
xhr.send(file);
...

M
m_frost, 2019-04-28
@m_frost

event.preventDefault or return false but honestly didn't work with .submit() because I don't know how to use it correctly

S
Sergey Kotov, 2019-04-28
@liqrizz

Without ajax xs

F
Froggyweb, 2017-08-23
@Froggyweb

Something I did not understand where does the slider to the basket. The product is added by id, usually if you cannot order the same product twice, then check it in the basket. To be honest, I don’t understand the relationship between duplicating slides and ordering at all. If a client double clicks on order on a static card, what will happen?
And in the case of sliders, this is the standard behavior for changing pictures without scrolling.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question