jQuery / JavaScript を使ったコーディングは初めてです。以下のコードを書くことができましたが、もっと簡単に書き留める方法があると思います。方法を教えてくれる人はいますか?
$(document).ready(function(){
$(".btn_home").click(function(){
$("#article1").fadeIn();
$("#article2").fadeOut();
$("#article3").fadeOut();
$("#article4").fadeOut();
$("#blended").fadeOut();
$("#contact").fadeOut();
});
$(".btn_prt").click(function(){
$("#article1").fadeOut();
$("#article2").fadeIn();
$("#article3").fadeOut();
$("#article4").fadeOut();
$("#over").fadeIn();
$("#blended").fadeOut();
$("#contact").fadeOut();
});
$(".btn_blog").click(function(){
$("#article1").fadeOut();
$("#article2").fadeOut();
$("#article3").fadeIn();
$("#article4").fadeOut();
$("#over").fadeOut();
$("#blended").fadeIn();
$("#contact").fadeOut();
});
$(".btn_abt").click(function(){
$("#article1").fadeOut();
$("#article2").fadeOut();
$("#article3").fadeOut();
$("#article4").fadeIn();
$("#over").fadeOut();
$("#blended").fadeOut();
$("#contact").fadeIn();
});
});