Title: swipe support
Last modified: August 30, 2016

---

# swipe support

 *  Resolved [phillystyle123](https://wordpress.org/support/users/phillystyle123/)
 * (@phillystyle123)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/swipe-support/)
 * I’ve used the swipe script on this page numerous times and haven’t had a problem:
   [http://lazcreative.com/blog/how-to/how-to-adding-swipe-support-to-bootstraps-carousel/](http://lazcreative.com/blog/how-to/how-to-adding-swipe-support-to-bootstraps-carousel/)
   but it does not work on with this plugin. I’ve got the following in the footer
   of my page, just above the </body> tag-as always.
 * This is the page with the carousel:
    [http://cjehost.com/ncjwla3/](http://cjehost.com/ncjwla3/)
 * <script src=”[http://cjehost.com/ncjwla3/wp-content/themes/ncjw1/js/jquery.mobile.custom.min.js”></script&gt](http://cjehost.com/ncjwla3/wp-content/themes/ncjw1/js/jquery.mobile.custom.min.js”></script&gt);
 * <script>
    $(document).ready(function() { $(“#cptbc_684”).swiperight(function(){
   $(“#cptbc_684”).carousel(‘prev’); }); $(“#cptbc_684”).swipeleft(function() { 
   $(“#cptbc_684”).carousel(‘next’); }); }); </script>
 * [https://wordpress.org/plugins/cpt-bootstrap-carousel/](https://wordpress.org/plugins/cpt-bootstrap-carousel/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * (@tallphil)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/swipe-support/#post-6219703)
 * Hi phillystyle123,
 * The code in `theme.js` is as follows:
 *     ```
       //must target by ID, so these need to be used in your content
       $('#myCarousel, #myCarousel2, #agnosia-bootstrap-carousel').swiperight(function() {
       	$(this).carousel('prev');
       });
       $('#myCarousel, #myCarousel2, #agnosia-bootstrap-carousel').swipeleft(function() {
       	$(this).carousel('next');
       });
       ```
   
 * The problem is actually suggested by the comment – those element IDs don’t exist
   in your page. The generated carousel has the ID `cptbc_928`, though this is auto-
   generated, so you’re better off targetting by class instead:
 *     ```
       $('.carousel.slide').swiperight(function() {
       ```
   
 * Hopefully that should work.
 * I’ve not seen swipe support for the carousel before though, that’s cool! I’ll
   make a note to think about adding support for a future version of the plugin.
 * Phil

Viewing 1 replies (of 1 total)

The topic ‘swipe support’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cpt-bootstrap-carousel_b8b7ae.svg)
 * [CPT Bootstrap Carousel](https://wordpress.org/plugins/cpt-bootstrap-carousel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cpt-bootstrap-carousel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/swipe-support/#post-6219703)
 * Status: resolved