How do I create a global function in JavaScript? code example
Example 1: access method globally js
window.checkCookie = function(){
// do whatever you want here
};
Example 2: javascript global function
window.my_function = function(){
//
}
window.checkCookie = function(){
// do whatever you want here
};
window.my_function = function(){
//
}