Thursday, September 12, 2013

JQuery notes

<style>

#abc {
    display: none;
}
</style>


   <script>
   
      $(document).ready(function() {       
                   
          $("#<portlet:namespace />def").change(function(){
              var id = $(this).find("option:selected").attr("id");

              switch (id){
                case "area":                 
                    $("#abc").css({display: "block"});
                    break;
                case "neu":
                    $("#eai").css('font-weight', 'bold');
                  break;
              }
            });
       
      });
     
     
   
    </script>

No comments:

Post a Comment