I'm trying to add jQuery to my view.  But, I'm missing something.  I can't
seem to get the code loaded.

In my bootstrap.php, I have:
     set_include_path('../library:../application/models' . PATH_SEPARATOR .
get_include_path());

In my "library path", I have two directories:  Zend and ZendX.

In my controller's init(), I have:
     $this->view->addHelperPath('ZendX/JQuery/View/Helper/',
'ZendX_JQuery_View_Helper');

In my view (index.phtml), I have:
     <head>
     <?php
             $this->jQuery()->enable();
             // enable and configure jQuery View Helper
             $this->jQuery()->setLocalPath("./js/jquery-1.2.6.min.js");
             //echo $this->jQuery();
     ?>
     .......... other stuff ..........
     </head>

I've tried echoing the jQuery() object, but I get an error.  I don't know if
that's because I haven't done something else I should be doing, or if I'm
not supposed to echo it.

My "./js/jquery-1.2.6.min.js" path works if I do:
     <script type="text/javascript" src="./js/jquery-1.2.6.min.js"></script>

I'm missing something conceptually.  Any ideas?

Reply via email to