You need to link these files from the page. Otherwise, you will hack your way against how these elements are included in html, and where your control is included in the page.
What we do, we attach all these separate js / css files to a single file with additional code (once). This way, you only link to one file from your main page . So far, you have nothing particularly difficult about this, which is very reasonable.
For id problem, change jquery to search by css class .
original answer: ignore below, I thought it was not yet in separate files.
Move it to the .js file and change it with id to use the class.
/.js-, , , , .js . js . , , .