old question, but perhaps still relevant. I solved it using jQuery UI function called "draggable".
$(function(){
$('.fancybox').fancybox({
padding : 0,
arrows: false,
helpers : {
thumbs : {
width : 150,
height : 50
}
},
onUpdate:function(){
$('#fancybox-thumbs ul').draggable({
axis: "x"
});
var posXY = '';
$('.fancybox-skin').draggable({
axis: "x",
drag: function(event,ui){
// get position
posXY = ui.position.left;
// if drag distance bigger than +- 100px: cancel drag function..
if(posXY > 100){return false;}
if(posXY < -100){return false;}
},
stop: function(){
// ... and get next or previous image
if(posXY > 95){$.fancybox.prev();}
if(posXY < -95){$.fancybox.next();}
}
});
}
});
})
You can watch it here.
http://jsfiddle.net/VacTX/4/