Skip to content

Instantly share code, notes, and snippets.

@wrumsby
Created July 2, 2013 08:54
Show Gist options
  • Select an option

  • Save wrumsby/5907742 to your computer and use it in GitHub Desktop.

Select an option

Save wrumsby/5907742 to your computer and use it in GitHub Desktop.
Using an AMD module
<!DOCTYPE html>
<html>
<head>
<title>Using modules</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.6/require.min.js"></script>
<script src="require_config.js"></script>
</head>
<body>
<p id="element">This is just some text.</p>
<script>
require(['bolderiser'], function (Bolderiser) {
'use strict';
var bolderiser = new Bolderiser();
bolderiser.embolden('#element');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment