ajax - Rails js action won't run code after partial render -
i'm trying add newly created partial existing list of partials gets rendered in create.js.erb controller action response, , nice scroll item , indicate new addition highlighting or something. have gotten hang of scrolling part in client side javascript, effects come after partial render in create.js.erb don't run. there plenty of examples of being possible, i'm not sure why mine doesn't work. first try: create.js.erb $('#alltab').removeclass('active'); $('#activetab').addclass('active'); $('#completetab').removeclass('active'); // todo: make sure li below gets id="campaign_####" before render happens. $('#activetablist').append("<li><%= escape_javascript(render partial: 'fundraisers/fundraiser', locals: {f: @fundraiser, g: @group}) %></li>") var number_li = $('#activetablist li').length; var $newcampaigndiv = $('#activetablist li').last().chi...