Kcko
9/16/2015 - 9:09 AM

Self invoke function with public and private methods

Self invoke function with public and private methods

	var log = {

		target: $("#message"),

		 pridej: function(text){

			this.target.append(text + "<br />");
		},
		clear: function()
		{
			this.target.empty()
		}

	};

	
	var pozdrav = (function(){

		var target = $("#message");

		var pridej = function(text){

			target.append(text + "<br />");
		};

		var clear = function()
		{
			target.empty();
		};


		return {

			x: pridej,
			clear: clear

		};

	})();