I would recommend using an object literal attached to a jQuery object. Just remember to include it in front of all your plugins:
jQuery.YourCompany = { url: "http://thedomain.com" };
Then, anywhere, just use
jQuery.YourCompany.url // or $.YourCompany.url
If you use objects / classes in combination with $.fn functions, you can also use this global variable as a namespace:
jQuery.YourCompany.PluginOne = function(el){ .... } // But not on the fn object: jQuery.fn.pluginOne = function(){ return this.each( function() { var po = new jQuery.YourCompany.PluginOne(this); }); }
source share