I have this
<%= link_to_remote "Next",
{:url => { :controller=>:objects,
:action=>:filter_recent,
:page=>@objects.next_page},
:with => "Form.serialize('filter')" },
:after => "alert('hello')"%>
I’ve tried :before, :after, :loading, :complete… none of them appear to be working… I know the button works, cause the table advances to the next page.
It looks like your arguments are incorrectly split up by the hash you wrapped them in.
Your :after JS snippet/callback is being passed to the html_options argument hash, not the options hash (where it would be used).
Change to the following: