Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%= "<s" + "cript>" %>
  2.         $('#Service').click(function() {
  3.             var Item = $('#Service').val();
  4.             $('#Site').find('option').each(function()
  5.             {
  6.                 var Id = $(this).attr('class');
  7.                 if (Id === Item)
  8.                     $(this).show();
  9.                 else
  10.                     $(this).hide();
  11.             });
  12.         })
  13.  
  14.         $('#Service').on('change', function() {
  15.             var Item = $('#Service').val();
  16.             var Site = $('#Site .'+Item).val();
  17.             $('#Site').val(Site);
  18.         })
  19.  
  20.         $(document).ready(function() {
  21.             var Item = $('#Service').val();
  22.             $("#Site option").each(function()
  23.             {
  24.                 var Id = $(this).attr('class');
  25.                 if (Id === Item)
  26.                     $(this).show();
  27.                 else
  28.                     $(this).hide();
  29.             });
  30.         });
  31. <%= "</" + "script>" %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement