Skip to content
Loading
asp.net core javascript not working properly
 
 javascript
 
  1. $(function () {  
  2.             $("#AffCategory").on("change"function () {  
  3.                 var data = $("#AffCategory :selected").text();  
  4.                 debugger;  
  5.                 if (data == "People") {  
  6.                     $("#ATRPeople").attr("hidden"false);  
  7.                     $("#ATRLabel1").attr("hidden"false);  
  8.                     $("#ATRLabel2").attr("hidden"false);  
  9.                     $("#affc").val(data);  
  10.                 }  
  11.                 if (data == "Assets") {  
  12.                     $("#ATRAsset").attr("hidden"false);  
  13.                     $("#ATRLabel1").attr("hidden"false);  
  14.                     $("#ATRLabel2").attr("hidden"false);  
  15.                     $("#affc").val(data);  
  16.                 }  
  17.                 else {  
  18.                     $("#ATRPeople").attr("hidden"true);  
  19.                     $("#ATRAsset").attr("hidden"true);  
  20.                     $("#ATRLabel1").attr("hidden"true);  
  21.                     $("#ATRLabel2").attr("hidden"true);  
  22.                 }  
  23.             });  
  24.         });  
 

1 Reply

Know the answer? Post it — somebody with the same question will find it here.