smash attribute on javascript