javascript working properly with turbolinks