Move this into ```application.js``` please. Btw: This kind of call got to be fired within ```jQuery(document).ready(function($) { });```