javascript - Embedly API call not wanting to work in Ruby on Rails app -


I make this call in my application.js file, but return it to the dynamically generated embedded video Does not have user input:

  $ ("# new_video"). Bind ('submit', function (e) {e.preventDefault (); var q = $ (this) .find ('(Q ==' ') return false; $ .embedly (q, {maxWidth: 500, wrapElement : 'Div'}, function (oembed, dict) {if (oembed ==) Html ('.video') .html ('& lt; p class = "text" & gt; not valid url & lt; / p & Gt; '); Other $ (".video") .html (oembed.code);})});   

I'm not sure where to go, where to go Is 'submit' , so that I can have trouble.

The URL the url sends to the URL, its ID is # nu_video , the field Key Id #video_video_url , And class video is generated from my video partial:

  

Comments