Using jQuery from Google

Using jQuery from Google

Due to traffic, images and flash files have been moved to another server and linked accordingly.

I discovered the following code while surfing and connected it to Google.

Modified file: theme/functions.php

[PHP]
//Making jQuery Google API
function modify_jquery()
{
if (!is_admin())
{
// Comment out the next two lines to load the local copy of jQuery
wp_deregister_script('jquery');
wp_register_script('jquery',
'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', false,
'1.4.4');
wp_enqueue_script('jquery');
}
}
add_action('init', 'modify_jquery');
[/PHP]

Leave a Reply

이메일 주소는 공개되지 않습니다. (* 질문, 건의사항 등은 "질문게시판"을 이용해주세요)