javascript - Ruby on Rails: Inserting .js file in asset but still getting no method -
this maybe long shot question ask, worth try...
i have .js file inserted vendor/assets/javascript folder , in application.js
in apps/assets/javascript folder, inserted correct file name
//= require autoresize.jquery
the file name autoresize.jquery.js
i'm using library here.
in 1 of .js.coffee script file have this
$(document).ready -> $('textarea').autosize();
but i'm getting error
uncaught typeerror: object [object object] has no method 'autosize'
i know jquery file being loaded because can see in chrome's inspection element tool, , also, have required jquery first. i'm not understanding why i'm still getting error?
Comments
Post a Comment