Swipe support added to the carousel
This commit is contained in:
parent
53b02d6a74
commit
82c2c400b6
3 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
3
app/assets/javascripts/jquery.mobile.custom.min.js
vendored
Normal file
3
app/assets/javascripts/jquery.mobile.custom.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -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 %>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue