mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-11-03 04:40:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
(function($){
 | 
						|
	$.ImageGridUI = function(el, options, options){
 | 
						|
		// To avoid scope issues, use 'base' instead of 'this'
 | 
						|
		// to reference this class from internal events and functions.
 | 
						|
		var base = this;
 | 
						|
		
 | 
						|
		// Access to jQuery and DOM versions of element
 | 
						|
		base.$el = $(el);
 | 
						|
		base.el = el;
 | 
						|
		
 | 
						|
		// Add a reverse reference to the DOM object
 | 
						|
		base.$el.data("ImageGridUI", base);
 | 
						|
		
 | 
						|
		base.init = function(){
 | 
						|
			
 | 
						|
			base.options = $.extend({},$.ImageGridUI.defaultOptions, options);
 | 
						|
			
 | 
						|
			// Put your initialization code here
 | 
						|
		};
 | 
						|
		
 | 
						|
		// Sample Function, Uncomment to use
 | 
						|
		// base.functionName = function(paramaters){
 | 
						|
		// 
 | 
						|
		// };
 | 
						|
		
 | 
						|
		// Run initializer
 | 
						|
		base.init();
 | 
						|
	};
 | 
						|
	
 | 
						|
	$.ImageGridUI.defaultOptions = {
 | 
						|
	};
 | 
						|
	
 | 
						|
	$.fn.imageGridUI = function(options, options){
 | 
						|
		return this.each(function(){
 | 
						|
			(new $.ImageGridUI(this, options, options));
 | 
						|
		});
 | 
						|
	};
 | 
						|
	
 | 
						|
	// This function breaks the chain, but returns
 | 
						|
	// the ImageGridUI if it has been attached to the object.
 | 
						|
	$.fn.getImageGridUI = function(){
 | 
						|
		this.data("ImageGridUI");
 | 
						|
	};
 | 
						|
	
 | 
						|
})(jQuery);
 | 
						|
 | 
						|
// vim:set ts=4 sw=4 nowrap :
 |