mfn

Class Check - Jquery

mfn
Aug 9th, 2013
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Class Define Selector
  2. Copyright 2013 FreakServ Inc. */
  3.  
  4. $(document).ready(function (){
  5.  
  6. $('#bcomSec').hide();
  7. $('#bscSec').hide();
  8. $('#NoSection').hide();
  9. $('#ClassYear').hide();
  10.  
  11.     $("#classname").change(function(){
  12.         if( $(this).val() == "Select a class." ) {
  13.             $("#bcomSec").hide();
  14.             $('#bscSec').hide();
  15.             $('#NoSection').hide();
  16.             $('#selsection').show();
  17.             $('#ClassYear').hide();
  18.             $('#selcyear').show();
  19.         }
  20.         if ( $(this).val() == "B.Com" ) {
  21.             $('#selsection').hide();
  22.             $('#NoSection').hide();
  23.             $('#bscSec').hide();
  24.             $("#bcomSec").show();
  25.             $('#ClassYear').show();
  26.             $('#selcyear').hide();
  27.         }
  28.         if( $(this).val() == "B.Sc" ) {
  29.             $('#selsection').hide();
  30.             $('#NoSection').hide();
  31.             $("#bcomSec").hide();
  32.             $('#bscSec').show();
  33.             $('#ClassYear').show();
  34.             $('#selcyear').hide();
  35.         }
  36.         if( $(this).val() == "B.A") {
  37.             $('#selsection').hide();
  38.             $("#bcomSec").hide();
  39.             $('#bscSec').hide();
  40.             $('#NoSection').show();
  41.             $('#ClassYear').show();
  42.             $('#selcyear').hide();
  43.         }
  44.         if( $(this).val() == "BBA") {
  45.             $('#selsection').hide();
  46.             $("#bcomSec").hide();
  47.             $('#bscSec').hide();
  48.             $('#NoSection').show();
  49.             $('#ClassYear').show();
  50.             $('#selcyear').hide();
  51.             $
  52.         }
  53.         if( $(this).val() == "BCA") {
  54.             $('#selsection').hide();
  55.             $("#bcomSec").hide();
  56.             $('#bscSec').hide();
  57.             $('#NoSection').show();
  58.             $('#ClassYear').show();
  59.             $('#selcyear').hide();
  60.         }
  61.     });
  62.    
  63. });
Advertisement
Add Comment
Please, Sign In to add comment