// JavaScript Document $(document).ready(function(){ /* register any elements that need validation * force validation on field change*/ $("a#apply").click(function(e) { $(".accordian").each(function(e){ if ($(this).css("display") != 'none'){ $(this).hide('slow'); }else{ $(this).show('slow'); } }); /*if ($(this).parent.find(".accordian").css("display") != 'none'){ $(this).parent.find(".accordian").hide('slow'); }else{ $(this).parent.find(".accordian").show('slow'); }*/ e.preventDefault(); }); });