When i’m calling registerJsFile() from my view, which i’m rendering via AJAX, the JS code works just once, but when i’m putting this code in <script> </script> tags it works OK. I mean for example i have div with id “data” and i’m rendering a view (which contains registerJsFile) in it by AJAX. JS code works ok, i’m rendering another view in this div, and then when i’m again rendering first view JS code stops working.
I want to keep js code in a separate file.
Is it possible?