I have to write global function in js file that is loaded initially. I want to write function on it so that it can be accessed from all pages. I am new in jquery. I want to
You can define the functions in js file and just include these js files in the pages where you want to use it using script tag.
All the functions defined in the js files will become global and can be used anywhere on the page or in other js files.