Obviously this FIDDLE won't take into account the initial state of the cards (you can do that on your own if you like), it has managed to achieve the onScroll effect you were looking for.
var visibleXStart = $('#wrapper').offset().left;
var visibleXEnd = $('#wrapper').offset().left + $('#wrapper').width();
$('#wrapper').scroll(function () {
$('.card').each(function () {
var thisCard = $(this);
if (thisCard.offset().left < visibleXEnd - 100) thisCard.css({
'-webkit-transform': 'rotatey(0deg)'
});
else thisCard.css({
'-webkit-transform': 'rotatey(-180deg)'
});
});
});
I have extended the fiddle provided by @aamir-afridi
You might also want to do some cleanup of the code to suit your webpage.
Hope it helps.