RequireJS

The Pondorsa Template uses RequireJS to load Javasript. Not using RequireJS may cause inconsistent behavior.

RequireJS is a Javascript dependency manager, making it easy to use javascript libraries like jQuery. RequireJS helps ensure that only one version of jQuery gets loaded making code easier to debug and manage. Here are some examples of how to use it.

jQuery


<script type="text/javascript">
    require(["jquery"],function(jQuery){
        jQuery(document).ready(function($){
           /*....your code here.....*/
        });
    });
</script>

jQuery UI


<script type="text/javascript">
    require(["jquery","jquery-ui"],function(jQuery){
        jQuery(document).ready(function($){
           /*....your code here.....*/
        });
    });
</script>

More information about RequireJS can be found at their website.