fixed js code to work with cocoon gem. new dom element/id