Merge branch 'swipe-colorbox' (ref #116).
This commit is contained in:
14
sigal/themes/colorbox/static/js/jquery.touchSwipe.min.js
vendored
Normal file
14
sigal/themes/colorbox/static/js/jquery.touchSwipe.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -114,6 +114,7 @@
|
||||
{% endif %}
|
||||
<script>!window.jQuery && document.write(unescape('%3Cscript src="{{ theme.url }}/js/jquery-1.10.2.min.js"%3E%3C/script%3E'))</script>
|
||||
<script src="{{ theme.url }}/js/jquery.colorbox.min.js"></script>
|
||||
<script src="{{ theme.url }}/js/jquery.touchSwipe.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(".gallery").colorbox({
|
||||
@@ -142,6 +143,19 @@
|
||||
return this.hasAttribute("inline");
|
||||
}
|
||||
});
|
||||
|
||||
$(document).bind('cbox_open', function(){
|
||||
$("#cboxOverlay, #colorbox").swipe({
|
||||
swipeLeft:function(event, direction, distance, duration, fingerCount) {
|
||||
$.colorbox.next();
|
||||
},
|
||||
swipeRight:function(event, direction, distance, duration, fingerCount) {
|
||||
$.colorbox.prev();
|
||||
},
|
||||
tap:function(event, target){
|
||||
$.colorbox.close()
|
||||
}}).unbind("click");
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user