Inspired by rails unobtrusive javscript