Salve a tutti,

avendo sempre lavorato prevalentemente con PHP lato server non ho una grande esperienza di OOP né di JS. Cercando in rete ho trovato questo script:

codice:
$(function(){
	
    $('a[href*=#]').click(function() {

    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {

            var $target = $(this.hash);

            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');

            if ($target.length) {
				
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);

                return false;
				
            }

        }

    });
	
});
Ora, il punto è che a me servirebbe riuscire a modificarlo in modo che faccia lo scrolling orizzontale e non verticale, ma all'interno di un div con overflow-x:scroll...

Grazie in anticipo!