我對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