Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.8k views
in Q2A Core by
i am trying to insert jquery1.6.2 using below code in Layout Section in Admin

 

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>

but it doesnot work .

what i observe in firebug that jquery1.6.1 is loading after 1.6.2 due to which jquery1.6.2 is not working , how to rectify this problem.

1 Answer

+1 vote
by

You don't really need to update jQuery unless there is a major security issue with an older version.

However, to change it, you need to create an advanced theme to override the head_script function. I do something similar to call the same jQuery file I use on the main site:

if (isset($this->content['script']))
{
    foreach ($this->content['script'] as $scriptline)
    {
        if ( strpos($scriptline, 'jquery') === false )
            $this->output_raw($scriptline);
        else
            $this->output_raw('<script src="your_jquery.js"></script>');
    }
}

 

by
where is the head_script function place? i dont know much about php.. i need this too..
by
bibuz, look here for instructions to create an advanced theme: http://www.question2answer.org/themes.php
Sorry but I can't give you a PHP tutorial... Q2A is a PHP program, to develop with it you need to know a bit of PHP at least :)
...