$('.parent').bind('touchmove',function(e) {
e.preventDefault();
var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
var position = $(this).offset();
var maxWidth = $(this).width();
var x = touch.pageX - position.left;
if (0 <= x && x <= maxWidth) $(".modal").width(x);
});