我对ZendX很新,我真的想在Zend上得到简单的JQuery示例以获得工作。我在下面的链接上遵循了该示例,但我得到的是纯文本框,没有任何datepicker功能如我所料。ZendX日期选择器示例不起作用
Best way to start using jQuery in a Zend Framework 1.9 application?
在我引导我
protected function _initViewHelpers()
{
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->doctype('XHTML1_STRICT');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('JQUERY Test');
//assuming you already have this function in your bootstrap
//jQuery (using the ui-lightness theme)
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$view->jQuery()->addStylesheet('/js/jquery/css/ui-lightness/jquery-ui-1.7.2.custom.css')
->setLocalPath('/js/jquery/js/jquery-1.3.2.min.js')
->setUiLocalPath('/js/jquery/js/jquery-ui-1.7.2.custom.min.js');
}
在我的布局,我已经包括
<head>
<?php echo $this->HeadMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
<?php echo $this->jQuery(); ?>
<?php echo $this->headLink()->prependStylesheet($this->baseUrl().'/css/main.css'); ?>
<?php echo $this->render('_javascript.phtml'); ?>
</head>
我缺少什么?
这就是我用来做我的例子中,解决方案,但没有avail.Sorry我忘了具体的,对于本地文件我已经交叉检查和路径链接earlier.As,他们是正确的。 – davykiash