how to enable select text in swiper.js
up vote
0
down vote
favorite
I am using this library for swiping, it's working fine as expected but i have this issue of text selection, so how to enable select text in <div class="swiper-slide>some text </div>
javascript slider swiper
add a comment |
up vote
0
down vote
favorite
I am using this library for swiping, it's working fine as expected but i have this issue of text selection, so how to enable select text in <div class="swiper-slide>some text </div>
javascript slider swiper
can you share the code what you have done ?
– Towkir Ahmed
Nov 19 at 2:05
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using this library for swiping, it's working fine as expected but i have this issue of text selection, so how to enable select text in <div class="swiper-slide>some text </div>
javascript slider swiper
I am using this library for swiping, it's working fine as expected but i have this issue of text selection, so how to enable select text in <div class="swiper-slide>some text </div>
javascript slider swiper
javascript slider swiper
asked Nov 19 at 1:02
Bourja Hamid
83
83
can you share the code what you have done ?
– Towkir Ahmed
Nov 19 at 2:05
add a comment |
can you share the code what you have done ?
– Towkir Ahmed
Nov 19 at 2:05
can you share the code what you have done ?
– Towkir Ahmed
Nov 19 at 2:05
can you share the code what you have done ?
– Towkir Ahmed
Nov 19 at 2:05
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
By default the click event acts as a touch event and the slide follow the mouse movement when you hold it. I have two solutions to select text inside a slide.
Option 1
You can wrap your text with a span element with class swiper-no-swiping
to disable swiping only on the text.
<div class="swiper-slide"><span class="swiper-no-swiping">some text</span></div>
Option 2
You can use the simulateTouch parameter to disable the click event as touch event in the whole area of the slides.
new Swiper('.swiper-container', { simulateTouch: false });
thank you so much @Santiago Pernigotti it's worked
– Bourja Hamid
Nov 19 at 22:42
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
By default the click event acts as a touch event and the slide follow the mouse movement when you hold it. I have two solutions to select text inside a slide.
Option 1
You can wrap your text with a span element with class swiper-no-swiping
to disable swiping only on the text.
<div class="swiper-slide"><span class="swiper-no-swiping">some text</span></div>
Option 2
You can use the simulateTouch parameter to disable the click event as touch event in the whole area of the slides.
new Swiper('.swiper-container', { simulateTouch: false });
thank you so much @Santiago Pernigotti it's worked
– Bourja Hamid
Nov 19 at 22:42
add a comment |
up vote
0
down vote
accepted
By default the click event acts as a touch event and the slide follow the mouse movement when you hold it. I have two solutions to select text inside a slide.
Option 1
You can wrap your text with a span element with class swiper-no-swiping
to disable swiping only on the text.
<div class="swiper-slide"><span class="swiper-no-swiping">some text</span></div>
Option 2
You can use the simulateTouch parameter to disable the click event as touch event in the whole area of the slides.
new Swiper('.swiper-container', { simulateTouch: false });
thank you so much @Santiago Pernigotti it's worked
– Bourja Hamid
Nov 19 at 22:42
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
By default the click event acts as a touch event and the slide follow the mouse movement when you hold it. I have two solutions to select text inside a slide.
Option 1
You can wrap your text with a span element with class swiper-no-swiping
to disable swiping only on the text.
<div class="swiper-slide"><span class="swiper-no-swiping">some text</span></div>
Option 2
You can use the simulateTouch parameter to disable the click event as touch event in the whole area of the slides.
new Swiper('.swiper-container', { simulateTouch: false });
By default the click event acts as a touch event and the slide follow the mouse movement when you hold it. I have two solutions to select text inside a slide.
Option 1
You can wrap your text with a span element with class swiper-no-swiping
to disable swiping only on the text.
<div class="swiper-slide"><span class="swiper-no-swiping">some text</span></div>
Option 2
You can use the simulateTouch parameter to disable the click event as touch event in the whole area of the slides.
new Swiper('.swiper-container', { simulateTouch: false });
edited Nov 19 at 2:16
answered Nov 19 at 2:10
Santiago Pernigotti
1115
1115
thank you so much @Santiago Pernigotti it's worked
– Bourja Hamid
Nov 19 at 22:42
add a comment |
thank you so much @Santiago Pernigotti it's worked
– Bourja Hamid
Nov 19 at 22:42
thank you so much @Santiago Pernigotti it's worked
– Bourja Hamid
Nov 19 at 22:42
thank you so much @Santiago Pernigotti it's worked
– Bourja Hamid
Nov 19 at 22:42
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53367064%2fhow-to-enable-select-text-in-swiper-js%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
can you share the code what you have done ?
– Towkir Ahmed
Nov 19 at 2:05