Topic: jQuery datepicker not initialized after partial appended in complx frm

I'm using the technique from Ryan Bates' rails cast episode #196 Nested Models Form to add/edit multiple people to/in a household. It's a rails 4 application using turbo links along with query.turbolinks.

My application also uses jQuery datepicker plugin.

My _person_fields partial includes a date field that uses the date picker plugin, but it doesn't work. The datepicker is not being initialized in the dynamically added person_fields partials.

I've tried several methods from the Turbolinks episode #390 with no success.

This is beyond my familiarity, but I think I need to somehow call document ready after the person_fields partial is added. Don't know how to do that.

Any suggestions are appreciated. Thanks!