ここで簡単な質問ですが、これらを init() 関数に設定し、その関数を document.ready で実行する方法を知りたいと思いました。このコードは、別の main.js ファイルで使用されています。インデックスページから呼び出す必要がありますか?
$('#main_right_line_one').click(function(){
$('#main_regular_layover, #main_deep_layover').fadeOut('slow', function(){
$('#main_light_layover').fadeIn('slow');
});
});
$('#main_right_line_two').click(function(){
$('#main_light_layover, #main_deep_layover').fadeOut('slow', function(){
$('#main_regular_layover').fadeIn('slow');
});
});
$('#main_right_line_three').click(function(){
$('#main_light_layover, #main_regular_layover').fadeOut('slow', function(){
$('#main_deep_layover').fadeIn('slow');
});
});
どんな助けでも大歓迎です。私は本当にこれに頭を悩ませようとしていますが、 init() を私の特定のコードに十分に説明する良いチュートリアルを見つけることができないようです。