What are some current \"rules of thumb\" for implementing JQuery namespaces to host general purpose utility functions?
I have a number
For the record, I ended up using the first syntax:
$(function ()
{
//********************************
// PREDIKT NAMESPACE
//********************************
if (typeof (Predikt) === "undefined")
{
Predikt = {};
}
//********************************
// PREDIKT.TIMER NAMESPACE
//********************************
if (typeof (Predikt.Timer) === "undefined")
{
Predikt.Timer = {};
}
Predikt.Timer.StartTimer = function ()
{
return new Date().getTime();
};
Predikt.Timer.EndTimer = function ()
{
return new Date().getTime();
};
});