Hide single bullet
Hello,
Is there an easy way to hide a bullet, if there is only one slide ?
Thank you.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Dmitry Semenov on 24 Jun, 2013 07:10 PM
Hello,
I suggest to simply not to initialize the slider if there is one slide.
Or you can do something like:
(after slider initialization)
Dmitry
2 Posted by dries on 25 Jun, 2013 07:52 AM
Ok, thank you !
3 Posted by Alex Belletti on 20 Sep, 2013 09:19 AM
var slider = $('.royalSlider'),
nav = slider.find('.rsNav');
if (slider.data('royalSlider').numSlides <= 1) {
nav.hide();
}
4 Posted by dries on 02 Oct, 2013 02:41 PM
Thank you Alex.
5 Posted by dsaenz on 19 May, 2014 11:35 PM
how would you hide the bullets but yet still keep the arrows?
Support Staff 6 Posted by Dmitry Semenov on 20 May, 2014 11:10 AM
@dsaenz,
controlNavigation:'none'
?.rsNav {display:none }
?7 Posted by dsaenz on 20 May, 2014 03:30 PM
Thanks for your quick response! you the best!
8 Posted by ad on 21 Jul, 2015 08:08 PM
Hi I have this code working, but if I have more then one RoyalSlider in the page even if have more then 1 slide, they also has bullets hidden.....is there a way this code can just hide for the sliders with 1 image? even if I have others slider in the same page? All Slider has the same class, formating.
jQuery(".royalslider-home").royalSlider({
// options go here
// as an example, enable keyboard arrows nav
keyboardNavEnabled: true,
controlNavigation: 'bullets',
globalCaption:true,
arrowsNavAutoHide: true,
imageScalePadding: 0,
autoScaleSlider: true,
autoScaleSliderHeight: 805,
navigateByClick: false,
autoPlay: {
// autoplay options go gere
enabled: true,
delay: 4000
}
});
var slider = $('.royalSlider-home'),
nav = slider.find('.rsNav');
if (slider.data('royalSlider').numSlides <= 1) {
nav.hide();
}
Thanks!
Support Staff 9 Posted by Dmitry Semenov on 22 Jul, 2015 10:32 AM
^ add some specific class to slider that shouldn't have bullets, and just hide them via CSS, e.g.:
10 Posted by ludwig.arcache on 18 Nov, 2017 11:31 AM
I don't want to hide the bullets, I want to hide the horizontal slider when only 1 image exist.
should I add this ?
<script>
if ($('.royalSlider').data('royalSlider').numSlides === 1) {
$('.rsNav').hide();
}
</script>
11 Posted by ludwig.arcache on 18 Nov, 2017 11:51 AM
fixed. thanks