Il js non è corretto, devi spostare l'istruzione $.attr(this, 'href').substr(1), fuori dal metodo animate altrimenti this si riferirà al documento che ovviamente non ha nessun attributo href
Il js non è corretto, devi spostare l'istruzione $.attr(this, 'href').substr(1), fuori dal metodo animate altrimenti this si riferirà al documento che ovviamente non ha nessun attributo href