var spanElements = document.getElementsByTagName('span');// 모든 span 태그 선택 하여 spanElements로 저장 for( var i =0; i filter.indexOf(navigator.platform.toLowerCase())){ $("span.menu1").click(function(){ $("span.menu1").css({"background":"url(/withonemotors/pjtCom/images/sub/tab1_over.jpg);"}); $("span.menu2").css({"background":"url(/withonemotors/pjtCom/images/sub/tab2.jpg);"}); $("span.menu3").css({"background":"url(/withonemotors/pjtCom/images/sub/tab3.jpg);"}); }); $("span.menu2").click(function(){ $("span.menu1").css({"background":"url(/withonemotors/pjtCom/images/sub/tab1.jpg);"}); $("span.menu2").css({"background":"url(/withonemotors/pjtCom/images/sub/tab2_over.jpg);"}); $("span.menu3").css({"background":"url(/withonemotors/pjtCom/images/sub/tab3.jpg);"}); }); $("span.menu3").click(function(){ $("span.menu1").css({"background":"url(/withonemotors/pjtCom/images/sub/tab1.jpg);"}); $("span.menu2").css({"background":"url(/withonemotors/pjtCom/images/sub/tab2.jpg);"}); $("span.menu3").css({"background":"url(/withonemotors/pjtCom/images/sub/tab3_over.jpg);"}); }); } else{ $("span.menu1").click(function(){ $("span.menu1").css({"background":"url(/withonemotors/pjtCom/images/sub/tab1_over.jpg);"}); $("span.menu2").css({"background":"url(/withonemotors/pjtCom/images/sub/tab2.jpg);"}); $("span.menu3").css({"background":"url(/withonemotors/pjtCom/images/sub/tab3.jpg);"}); }); $("span.menu2").click(function(){ $("span.menu1").css({"background":"url(/withonemotors/pjtCom/images/sub/tab1.jpg);"}); $("span.menu2").css({"background":"url(/withonemotors/pjtCom/images/sub/tab2_over.jpg);"}); $("span.menu3").css({"background":"url(/withonemotors/pjtCom/images/sub/tab3.jpg);"}); }); $("span.menu3").click(function(){ $("span.menu1").css({"background":"url(/withonemotors/pjtCom/images/sub/tab1.jpg);"}); $("span.menu2").css({"background":"url(/withonemotors/pjtCom/images/sub/tab2.jpg);"}); $("span.menu3").css({"background":"url(/withonemotors/pjtCom/images/sub/tab3_over.jpg);"}); }); } }*/ });