dovrebbe bastare
codice:
var targetOffset = $target.offset().left;
$('#idTuoElemento').animate({scrollLeft: targetOffset}, 1000);
al posto di
codice:
var targetOffset = $target.offset().top;
$('html,body').animate({scrollTop: targetOffset}, 1000);
ciao