I’m trying to get data returned from a controller and append it to a div. Here is the code I have:
$(this).parent().find('list').append(__WHAT_GOES_HERE?__);
How should I get data to append using ajax in JQuery? I know this is a very basic question — I’m new to JS 🙁
PS. Lets assume the controller’s path is /ajax_get_items
I assume you want to load it into a class, so
listwould be.listSomething like:
Or if you want to just load data without params (GET method):
If you want more information about ruby rails and jQuery: http://brandonaaron.net/blog/2009/02/24/jquery-rails-and-ajax