Created
February 21, 2019 12:32
-
-
Save kartick14/fd218fe956220e9ce045ed9c7ddd0f5b to your computer and use it in GitHub Desktop.
Create global function in jquery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.myModule = window.myModule || {}; | |
| myModule.upsellReload = (function() { //global function call from anywhere | |
| console.log('Upsell added!'); | |
| location.reload(); | |
| }); | |
| myModule.upsellReload(); //Call function from anywhere |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment