C
C
Christina2018-02-07 10:30:56
JavaScript
Christina, 2018-02-07 10:30:56

How to disable slider arrows?

Hello!
Please tell me how to write such a script that if the links in the block occupy a width of less than 600 pixels, for example, then in the intended slider the left and right arrows will have display: none.
https://codepen.io/anon/pen/vdKmRp
Thanks!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ainur Valiev, 2018-02-07
@KrisIris

if($('.block').offsetWidth < 600)
  $('.block .arrows').hide()

D
Dmitry Demidenko, 2018-02-07
@detriat

This can be done using media
But if we are talking about a slider, then usually it has disable options, which are indicated in the responsive property
https://codepen.io/anon/pen/oEzOZm
media (max-width: 600px){
a {
display : none;
}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question