0
5クリック機能を1つに変換するにはどうすればよいですか?例えば5クリック機能を値を変更して1つに変換するには
$("div#styleswitcher a.green").click(function(){
$("container").css({'background' : 'green'});
)
$("div#styleswitcher a.blue").click(function(){
$("container").css({'background' : 'blue'});
)
$("div#styleswitcher a.red").click(function(){
$("container").css({'background' : 'red'});
)
$("div#styleswitcher a.yellow").click(function(){
$("container").css({'background' : 'yellow'});
)
良いとクリーンなソリューションあなたの例のように、クラス名でなければならないことです! – tekBlues