<html>
    
    <script src="https://code.jquery.com/jquery-1.11.2.js"></script>
    <title>My first test</title>
    
        <script>

            var myFirstModule = (function () {

                // setup
                var colorToChange = "red";

                function changeColor() {
                    $("button").css("color", colorToChange);
                };

                var setup = function(color) {
                    $("button").click(function () {
					    colorToChange = color; 
                        changeColor();
                    });
                }

                return {
                    setup: setup
                }

            })();


            $(function() {
                myFirstModule.setup("blue");
            });

    </script>
    

    <body>
        
        <button>Test</button>
		
    </body>
    
    


</html>
<html>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.15/require.js"></script>
    <script src="https://code.jquery.com/jquery-1.11.2.js"></script>
	<script src="https://cdnjs.com/libraries/require-domready"></script>
    <title>My first test</title>
    
        <script>

        define("myFirstModule", ["jquery"], function (jquery) {

            var colorToChange = "red";

            var changeColor = function () {
                jquery("button").css("color", colorToChange);
            };

            var setColor = function (color) {
                colorToChange = color;
            }

            var setup = function () {
                jquery("button").click(function () {
                    changeColor();
                });
            }

            return {
                setColor: setColor,
                setup: setup
            }

        });
        
		require(['domReady', 'myFirstModule'], function (domReady, myFirstModule) {
			domReady(function () {				
                myFirstModule.setColor("blue");
                myFirstModule.setup();            
		  });
		});

       

    </script>
    

    <body>
        
        <button>Test</button>

    </body>
    
    


</html>
Revert "Revert "Merge remote-tracking branch 'origin/master'""
Revert "Revert "Merge remote-tracking branch 'origin/master'""

This reverts commit 042e25970508210c9bc1775bc93b51fcde941a75.
