How do I switch these create.js.erb and destroy.js.erb files from prototype to jquery?
create.js.erb
$("follow_form").update("<%= escape_javascript(render('users/unfollow')) %>")
$("followers").update('<%= "#{@user.followers.count} followers" %>')
destroy.js.erb
$("follow_form").update("<%= escape_javascript(render('users/follow')) %>")
$("followers").update('<%= "#{@user.followers.count} followers" %>')
This is the only prototype stuff I have in my app and I want to switch over to jquery and start to learn from there. Thanks for any help!
It’s extremely similar
update