JQuery in a AutoNav

Permalink
Hi,

I am using a plugin to do a nice responsive menu. It is working fine and the code is all encased in a autonav template.

It uses JQuery and generally there is no JQuery on page unless the theme developer is using it or you are logged in.

I found this article which is brillaint and very helpful
http://andrewembler.com/posts/javascript-jquery-and-concrete5/...

but i am not sure where to put my
public function on_page_view() {
   $html = Loader::helper('html');
   $this->addHeaderItem($html->javascript('jquery.js'));
 }


do i place this in the view.php or in the controller in the root of the autonave block.

If it is in the controller the code in there looks like this so far
<?php 
   defined('C5_EXECUTE') or die("Access Denied.");
   class AutonavBlockController extends Concrete5_Controller_Block_Autonav { }
   class AutonavBlockItem extends Concrete5_Controller_Block_AutonavItem { }


so where does it go.

also what version of JQuery is used in 5.6+

TMDesigns
 
TMDesigns replied on at Permalink Reply
TMDesigns
I think the controller is the way forward, but still unsure as the different things I have tried don't work
TMDesigns replied on at Permalink Reply
TMDesigns
Double post
TMDesigns replied on at Permalink Reply
TMDesigns
Can any body help?
Steevb replied on at Permalink Reply
Steevb
It should be in the controller and C5.6 uses js 1.7.2
TMDesigns replied on at Permalink Reply
TMDesigns
But by default it only installs it when you are logged in. How can I override this so i can use a greater version?