1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
$(".gallery").colorbox({
rel:"gallery",
transition:"none",
maxWidth: "90%",
maxHeight: "90%",
scalePhotos: true,
current: "{current} / {total}",
title: function () {
title = this.title;
if(this.hasAttribute("data-big")) {
title += " (full size)".link(this.getAttribute("data-big"));
}
if(this.hasAttribute("data-date")) {
title += this.getAttribute("data-date");
}
return title;
},
href: function () {
return this.getAttribute("data-href");
},
inline: function() {
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()
},
excludedElements: $.fn.swipe.defaults.excludedElements + ", #colorbox"
}).unbind("click");
});
|