Assets: CSS & JS

Global JS

The current version of global Javascript depends on a custom implementation of Modernizr and jQuery > 2.0. You should include Modernizr in the <head> portion of your page.

<script src="http://assets.iu.edu/web/1.5/libs/modernizr.min.js"></script>

Once you have included Modernizr, you can use the current version of global Javascript by including the following script. Since the global javascript depends on jQuery, you must include this file after your implementation of jQuery.

<script src="//assets.iu.edu/web/3.3.x/js/iu-framework.min.js"></script>

Finally, in order for global Javascript to be in initialized, use the following after the global Javascript file:

/*!
 * Initialize IU JS
 */
(function($, window, document, undefined) {

    $(document).ready(function() {

        Foundation.OffCanvas.defaults.transitionTime = 500;
        Foundation.OffCanvas.defaults.forceTop = false;
        Foundation.OffCanvas.defaults.positiong = 'right';

        Foundation.Accordion.defaults.multiExpand = true;
        Foundation.Accordion.defaults.allowAllClosed = true;

        // Initialize Foundation
        $(document).foundation();

        var IU = window.IU || {};

        // Delete modules if necessary
        // delete IU.uiModules['accordion'];

        IU.init && IU.init();
    });
})(jQuery, window, window.document);