I would like to use jquery instead of prototype and I am a bit lost to convert this observe_field in jquery.
<%=text_field_tag :section %>
<%= observe_field(:section,
:frequency => 0.1,
:update => "article_list",
:with => 'section',
:url =>{ :action => :get_article_list }) %>
Here is my start:
$(document).ready(function() {
$("#section").bind("keyup", function() {
var url = '/catalogs/get_article_list';
$.get(url, function(html) {
$("#article_list").html(html);
});
});
});
I read this post but I think I'm missing something.
Would appreciate any explanations.
Thanks.