$(document).ready(function () { $('.box').hide(); $('#selectField').change(function () { $('.box').hide(); $('#'+$(this).val()).show(); }); }); function omnitracken(){ var selectedanswer = document.getElementById("selectField").selectedIndex; var selectedState = document.getElementsByTagName("option")[selectedanswer].value; if(selectedState != "find"){ var s=s_gi(s_account); s.events='event11'; s.eVar24=s.prop24='lunar-new-year-en:'+selectedState; s.linkTrackVars='eVar24,events,prop24'; s.linkTrackEvents='event11'; s.tl(this,'o',s.prop24); } } function omnitrackcn(){ var selectedanswer = document.getElementById("selectField").selectedIndex; var selectedState = document.getElementsByTagName("option")[selectedanswer].value; if(selectedState != "find"){ var s=s_gi(s_account); s.events='event11'; s.eVar24=s.prop24='lunar-new-year-cn:'+selectedState; s.linkTrackVars='eVar24,events,prop24'; s.linkTrackEvents='event11'; s.tl(this,'o',s.prop24); } }