Thursday 18 December 2014

jQuery select one radio at one time with different name tested on local

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <script type="text/javascript">
 
 $(document).ready(function(){
 $('#choice_46_0').click(function () {


  if ($('#choice_46_0').is(':checked'))
   {
   $('#choice_49_0').attr('checked', false);
   }
 
  });
  $('#choice_49_0').click(function () {


  if ($('#choice_49_0').is(':checked'))
   {
   $('#choice_46_0').attr('checked', false);
   }
 
  });
  alert("Hi");

 });

 </script>

No comments:

Post a Comment