Make name on link_to_remote change

Hello,

I have the following link_to_remote code that calls the going method.
It works right but I want that after the call the name “Not going!”
changes to “I am going!”. Whats the easiest way to do this? I have a
going.js.rjs file which is below.

  • <%= link_to_remote 'Not going!', :url => going_neighborhood_event_path(@event.user.neighborhood,@event), :method => :put if current_user == @event.user %>

  • js file

    if @attendance.errors.empty?
    page.visual_effect(:highlight, “going”, :duration => 1)
    end


    def going
    @attendance = Attendance.find(:first, :conditions => [“event_id = ?
    and user_id = ?”, params[:id], current_user.id])
    if @attendance.toggle!(:rsvp)
    respond_to { |format| format.js }
    end
    end