PHP-Zendx jQuery自动完成

前端之家收集整理的这篇文章主要介绍了PHP-Zendx jQuery自动完成 前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

当我在Zend documentation中注意到此部分时,我一直在尝试使Zend Jquery自动完成功能起作用.

The following UI widgets are available as form view helpers. Make sure you use the correct version of jQuery UI library to be able to use them. The Google CDN only offers jQuery UI up to version 1.5.2. Some other components are only available from jQuery UI SVN,since they have been removed from the announced 1.6 release.

autoComplete($id,$value,$params,$attribs): The AutoComplete View helper will be included in a future jQuery UI version (currently only via jQuery SVN) and creates a text field and registeres it to have auto complete functionality. The completion data source has to be given as jQuery related parameters ‘url’ or ‘data’ as described in the jQuery UI manual.

有谁知道我需要下载哪个svn url标记或分支才能获得具有自动完成功能的javascript文件

目前,我的Bootstrap.PHP

    $view->addHelperPath('ZendX/JQuery/View/Helper/','ZendX_JQuery_View_Helper'); 
    $view->jQuery()->enable();
    $view->jQuery()->uiEnable();
    Zend_Controller_Action_HelperBroker::addHelper(
        new ZendX_JQuery_Controller_Action_Helper_AutoComplete()
    );

    // Add it to the ViewRenderer
    $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
    $viewRenderer->setView($view);
    Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);

在我的布局中,我定义了我想要的jQuery UI版本

<?PHP echo $this->jQuery()
    ->setUiVersion('1.7.2');?>

最后,我的index.phtml具有自动完成小部件

<p><?PHP $data = array('New York','Tokyo','Berlin','London','Sydney','Bern','Boston','Baltimore'); ?>
<?PHP echo $this->autocomplete("ac1","",array('data' => $data));?></p>

我正在使用Zend 1.8.3 atm.

最佳答案
我上次检查时是在dev branch.

唯一的问题是,我不确定这是否完成和准备就绪,甚至不能与ZendX_Jquery一起使用.您可以在the progress of autoComplete on the official wiki page上保持最新.

原文链接:https://www.f2er.com/jquery/530917.html

猜你在找的jQuery相关文章