Hi,
I am trying to get paginating to work with jQeury. I am using the will_paginate gem. It works normally (with no javascript). I tried following a railscast (http://railscasts.com/episodes/174-pagination-with-ajax) but I am still having a problem.
show.js.erb
$('#comments').html("<%= escape_javascript(render "comments/comment.html.erb") %>");
This works when the partial file is just html. IE no <% code like this %>. Why? Is .html the wrong jQuery function to call? What should I use?
From trying lets of things, this code might be the problem:
$(".pagination a").click(function() {
//$(".pagination").html("Page is loading...");
$.get(this.href, null, null, "script");
return false;
});
what is "script"?