custom JavaScript/jQuery not working when refreshing page

Hello everyone, today I tryed to import a jquery plugin for image zoom. Everything went ok, I created
custom ApplicationServlet where jquery.js,zoom plugin.js and custom.css are inserted.
Then, from my CustomApplication i run executeJavaScript(jsZoomFunction());
and this
works
. But… when I refresh page, it doesn`t work anymore.
I tryed calling the zoomFunction directly from .js file when inside

window.load , document.ready and nothing worked.
Any ideas? I hope you guys understood me.

Thanks in advance,

Miroslav