Skip to content

Instantly share code, notes, and snippets.

@jboesch
Created April 5, 2010 16:29
Show Gist options
  • Save jboesch/356540 to your computer and use it in GitHub Desktop.
Save jboesch/356540 to your computer and use it in GitHub Desktop.
(function($){
window.App = {
// Site wide options
opts = {
rootURL: '/'
};
// Pass in any options to 'o' and merge it with global defaults
init: function(o){
this.opts = $.extend({}, this.opts, o);
}
}
})(jQuery);
<script type="text/javascript">
App.init({
rootURL: '<?= $your_siteurl ?>'
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment