Created
March 6, 2013 11:31
-
-
Save drublic/5098709 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Some configuration | |
var config = { | |
moduleName: { | |
moduleContextSelector: '.select-an-awesome > .module', | |
moduleTitle: 'Some Arbitrary Title', | |
moduleTimeoutSpeed: 3000 | |
} | |
}; | |
// New module | |
Namespace.ModuleName = function () { | |
return { | |
// Set the module's title | |
setModuleTitle: function () { | |
setTimeout(function () { | |
// Set the title using the config | |
$('h2', config.moduleName.moduleContextSelector).text(config.moduleName.moduleTitle); | |
// Use configured speed, rather than setting it manually | |
}, config.moduleName.moduleTimeoutSpeed); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment