Set jQueryUiPath in Zend Framework project

2019-08-28 22:16发布

问题:

in my main layout template I set jQuery paths:

if ($this->jQuery ()->isEnabled ()) {
    $this->jQuery ()->setLocalPath ( $this->baseUrl () . '/js/jquery/jquery-1.4.2.min.js' )->setUiLocalPath ( $this->baseUrl () . '/js/jquery/jquery-ui-1.8.4.custom.min.js' )->addStyleSheet ( $this->baseUrl () . '/js/jquery/css/custom-theme/jquery-ui-1.8.4.custom.css' );
    echo $this->jQuery ();
}

but for some reason the ui javascript file does not appear in the header, however the css for ui is included. any ideas?

回答1:

solved it. ui has to be enabled

$this->jQuery ()->uiEnable();