stephane.cedroni said about 8 years ago on DRY up your Javascript :

Hi, is there a reason you use both $document('ready') and 'turbolinks:load' listeners? As far as I know 'turbolinks:load' should be called on initial page load as well, making $document('ready') redundant.


David Kimura PRO said about 8 years ago on DRY up your Javascript :

It's a strange situation where you have two acting parts. The initial form when creating a new contact would trigger the date picker from turbolinks:load. However, when you go to edit the contact, the turbolinks:load would not trigger since it is a server generated javascript being sent back. In hindsight, the document.ready should be removed from the date_picker_init.js file and placed under the edit.js.erb since it is more applicable there. 


Rehan Khan said over 7 years ago on DRY up your Javascript :

bootstrap event $('#edit_contact').modal('show') inside of popup its appear below the page is there any solution to solve this problem.


Login to Comment