Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
593 views
in Plugins by
I'd like to use google's CDN: https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js

instead of the "local" ./qa-content/jquery-1.7.1.min.js

How to change this properly?

In qa-page.php (line 721) I found the script, but do not like to hack the core again.
Q2A version: 1.5

2 Answers

+1 vote
by
selected by
 
Best answer

See here: http://question2answer.org/qa/9739/how-to-insert-jquery1-6-2 (requires an advanced theme)

+1 vote
by

Here is mine,

I added this function in qa-theme.php of Snow theme


    public function head_script()
    {
        $jquery_script_tag = '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>';
        
        $this->output_raw($jquery_script_tag);

        if (isset($this->content['script'])) {
            foreach ($this->content['script'] as $script_line) {
                if( strpos($script_line, 'qa-content/jquery-') !== false ){
                    continue;
                }
                $this->output_raw($script_line);
            }
        }
    }

...