Toggle Event

클릭할 때 마다 다른 처리를 실행하는 toggle()



꽃
							$(document).ready(function(){
								$("#testBtn").toggle(function () {
									$("img" , "#changeImg").attr("src", "/florakid_lib/images/sample/sea.jpg").attr("alt","바다");
								},
								function () {
									$("img" , "#changeImg").attr("src", "/florakid_lib/images/sample/Jellyfish.jpg").attr("alt","해파리");
								},
								function () {
									$("img" , "#changeImg").attr("src", "/florakid_lib/images/sample/building.jpg").attr("alt","건물");
								},
								function () {
									$("img" , "#changeImg").attr("src", "/florakid_lib/images/sample/flower.jpg").attr("alt","꽃");
								});
							});