Set jQueryUiPath in Zend Framework project

2019-08-28 22:03发布

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条回答
别忘想泡老子
2楼-- · 2019-08-28 22:34

solved it. ui has to be enabled

$this->jQuery ()->uiEnable();
查看更多
登录 后发表回答