Created
July 2, 2013 08:54
-
-
Save wrumsby/5907742 to your computer and use it in GitHub Desktop.
Using an AMD module
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
| <!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