Best way to start using jQuery in a Zend Framework 1.9 application?

Viewed 21850

I want to get started working with jQuery in my Zend Framework application but not sure which is the best way to get started. I know I could include the jQuery library just like any other javascript library, but what are the advantages of using ZendX_JQuery, and what are the steps necessary to start using it in my Zend Framework 1.9 application?

6 Answers

Just wanted to add that you have to (or at least I had to) enable the jquery and jquery components in the _initViewHelpers function:

$view->jQuery()->enable()
            ->uiEnable();

As user117640 sad,

I had to enable the jQuery and UI, it can be done in:

bootstrap :

//it will enable for all views
$view->jQuery()->enable()->uiEnable();

controller::someAction :

//JQ enabled for particular view)
$this->view->jQuery()->enable()->uiEnable();

view someAction.phtml:

//JQ enabled for particular view
<?php $this-jQuery()->enable()->uiEnable(); ?>
Related