My script is not working

You must write this stuff within Ember hooks because eg $document.ready is meaningless in an Ember app.

You may need to look at modifying the js of the modal’s controller depending on your needs.