Swipe support added to the carousel

This commit is contained in:
Ana 2016-06-16 13:04:44 +02:00
parent 53b02d6a74
commit 82c2c400b6
3 changed files with 12 additions and 0 deletions

View file

@ -12,6 +12,7 @@
// //
//= require jquery //= require jquery
//= require jquery_ujs //= require jquery_ujs
//= require jquery.mobile.custom.min
//= require waypoints/jquery.waypoints //= require waypoints/jquery.waypoints
//= require dataTables/jquery.dataTables //= require dataTables/jquery.dataTables
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap //= require dataTables/bootstrap/3/jquery.dataTables.bootstrap

File diff suppressed because one or more lines are too long

View file

@ -70,5 +70,13 @@ function(){
$(document).ready(function(){ $(document).ready(function(){
// hide the left control when the page is ready // hide the left control when the page is ready
$('.carousel').children('.left.carousel-control').hide(); $('.carousel').children('.left.carousel-control').hide();
// carousel swipe
$(".carousel-inner").swiperight(function() {
$(this).parent().carousel('prev');
});
$(".carousel-inner").swipeleft(function() {
$(this).parent().carousel('next');
});
}); });
<% end %> <% end %>