// JavaScript Document (function( $ ){ var methods = { show : function( ) { var id = "getcategory-ajax-loading-dom"; var loadingdiv = ''; $(this).append(loadingdiv); }, hide : function( ) { if($('#getcategory-ajax-loading-dom').length > 0) { $('#getcategory-ajax-loading-dom').remove(); } } }; $.fn.loadinglayer = function( method ) { // Method calling logic if ( methods[method] ) { return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $.error( 'Method ' + method + ' does not exist' ); } }; })( jQuery );