helpers/Foundation.php
public static function registerCoreScripts(
        $useZepto = false,
        $minimized = true,
        $position = \CClientScript::POS_END
    ) {
        /** @var CClientScript $cs */
        $cs = \Yii::app()->getClientScript();

        if ($useZepto) {
            $cs->registerScriptFile(static::getAssetsUrl() . '/js/vendor/zepto.js');
        } else {
            $cs->registerCoreScript('jquery');
        }
        // normalizer goes at the head no matter what
        $cs->registerScriptFile(static::getAssetsUrl() . '/js/vendor/custom.modernizr.js', \CClientScript::POS_HEAD);
        $script = $minimized
            ? '/js/foundation.min.js'
            : '/js/foundation/foundation.js';
        $cs->registerScriptFile(static::getAssetsUrl() . $script, $position);
        $cs->registerScript(__CLASS__, '$(document).foundation();');
    }
public static function registerCoreScripts(
        $useZepto = false,
        $minimized = true,
        $position = \CClientScript::POS_END
    ) {
        /** @var CClientScript $cs */
        $cs = \Yii::app()->getClientScript();

        if ($useZepto) {
            $cs->registerScriptFile(static::getAssetsUrl() . '/js/vendor/zepto.js');
        } else {
            $cs->registerCoreScript('jquery');
        }
        // normalizer goes at the head no matter what
        $cs->registerScriptFile(static::getAssetsUrl() . '/js/vendor/custom.modernizr.js', \CClientScript::POS_HEAD);
        $script = $minimized
            ? '/js/foundation.min.js'
            : '/js/foundation/foundation.js';
        $cs->registerScriptFile(static::getAssetsUrl() . $script, $position);
        $cs->registerScript(__CLASS__, '$(document).foundation();');
    }
public static function registerCoreScripts ( $ useZepto = false , $ minimized = true , $ position = \ CClientScript :: POS_END ) { /** @var CClientScript $cs */ $ cs = \ Yii :: app ( ) -> getClientScript ( ) ; if ( $ useZepto ) { $ cs -> registerScriptFile ( static :: getAssetsUrl ( ) . '/js/vendor/zepto.js' ) ; } else { $ cs -> registerCoreScript ( 'jquery' ) ; } // normalizer goes at the head no matter what $ cs -> registerScriptFile ( static :: getAssetsUrl ( ) . '/js/vendor/custom.modernizr.js' , \ CClientScript :: POS_HEAD ) ; $ script = $ minimized ? '/js/foundation.min.js' : '/js/foundation/foundation.js' ; $ cs -> registerScriptFile ( static :: getAssetsUrl ( ) . $ script , $ position ) ; $ cs -> registerScript ( __CLASS__ , '$(document).foundation();' ) ; }
Registers jQuery and Foundation JavaScript.
@param bool $useZepto whether to use zepto or not
@param bool $minimized whether to register full minimized library or not
@param int $position the position to register the core script
Registers jQuery and Foundation JavaScript .