Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #28546
Closed
Open
Issue created Mar 22, 2019 by Administrator@rootContributor

carousel is sliding on ios when clicking whitout controls

Created by: MarjolaineLB

Hi there,

I've an issue I can't understand using the bootstrap carousel. On mobile, I want to slide by swiping (and not clicking), and, on click, a pinterest button appears. I've desactivated the carousel control buttons on mobile device (see css code below) and have a jquery rule to the pinterest button, It works perfectly on android. But on ios, on click, the carousel is sliding.

Any idea ?

My code

<div id="carouselwork" class="carousel slide work-single" data-ride="carousel" data-interval="false">
                    <div class="carousel-inner">
                        <div class="carousel-item  active">
                             <img src="..." alt="..." />
                             <div class="social-sharing ss-social-sharing" >
				   <a onclick="return ss_plugin_loadpopup_js(this);" rel="external nofollow" class="ss-button-pinterest" href="..." target="_blank"></a>
                             </div>
                             <div class="img-work-caract">
                                 <p>the title</p>
                                 <div class="counter">1/<span class="total">2</span>
                                 </div>
                            </div>
                        </div>
                        <div class="carousel-item">
                            <img src="..." alt="..." />
                             <div class="social-sharing ss-social-sharing" >
				  <a onclick="return ss_plugin_loadpopup_js(this);" rel="external nofollow" class="ss-button-pinterest" href="..." target="_blank"></a>
                             </div>
                             <div class="img-work-caract">
                                 <p>the title</p>
                                 <div class="counter">2/<span class="total">2</span>
                                 </div>
                            </div>
                        </div>
                    </div>
                    <a class="carousel-control-prev carousel-control" href="#carouselwork" role="button" data-slide="prev"></a>
                    <a class="carousel-control-next carousel-control" href="#carouselwork" role="button" data-slide="next"></a>
                </div>

and css

@media (max-width: 768px) {
        .social-sharing.visible {
            display: block;
        }
        .carousel-control {
            display: none;
        }
    }

and jquery :

$('.carousel-item img').click(function() {
     $('.social-sharing').toggleClass('visible'); });
$("#carouselwork").on('slide.bs.carousel', function () {
       $('.social-sharing').removeClass('visible');
 });

Thanks !

Assignee
Assign to
Time tracking