Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // default.js
- $.fn.showLoader = function() {
- this.ajaxStart(function() {
- this.show();
- $(this).html('<img id="loading" src="images/loading.gif" alt="loading" />');
- });
- };
- // other_file.js
- $(function() {
- $('#someDiv').showLoader();
- });
Add Comment
Please, Sign In to add comment