サイトフロントエンドのjQuery 1.4.2

DrupalにはないjQueryバージョン1.4.2では、多くの興味深い便利な機能が動作します(私には思えますが、期待されていません)。



1. jQuery更新プログラムをインストールします(バージョン1.3.2を含む)



2. jQuery 1.4.2をダウンロードします: jquery-1.4.2.min.js最小バージョン)およびjquery-1.4.2.js (ソースバージョン)。



3.ダウンロードしたバージョンを/サイト/すべて/モジュール/ jquery_update / replace /にコピーします



4. /sites/all/modules/jquery_update/jquery_update.moduleファイルを開き、関数を見つけます



/**

* Return the path to the jQuery file.

*/



function jquery_update_jquery_path() {

$jquery_file = array( 'none' => 'jquery.js' , 'min' => 'jquery.min.js' );

return JQUERY_UPDATE_REPLACE_PATH . '/' . $jquery_file[variable_get( 'jquery_update_compression_type' , 'min' )];

}




* This source code was highlighted with Source Code Highlighter .






それを変更します(古いものをコメントアウトするだけです)。



/**

* Return the path to the jQuery file.

*/

function jquery_update_jquery_path() {

$curr_uri = request_uri();

if (strpos($curr_uri, 'admin' )>0 || strpos($curr_uri, 'edit' )>0 || strpos($curr_uri, 'add' )>0){

$jquery_file = array( 'none' => 'jquery.js' , 'min' => 'jquery.min.js' );

return JQUERY_UPDATE_REPLACE_PATH . '/' . $jquery_file[variable_get( 'jquery_update_compression_type' , 'min' )];

}

else {

$jquery_file = array( 'none' => 'jquery-1.4.2.js' , 'min' => 'jquery-1.4.2.min.js' );

return JQUERY_UPDATE_REPLACE_PATH . '/' . $jquery_file[variable_get( 'jquery_update_compression_type' , 'min' )];

}

}




* This source code was highlighted with Source Code Highlighter .







All Articles