[Solved] check radio button when the mouse is over it [closed]


<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <style>
   </style>
</head>
<body>
  <label>
    <input type="radio" name="photo" data-image="http://placehold.it/350x150" class="radio-hover">
    Option - 1
  </label>
  
  <label>
    <input type="radio" name="photo" data-image="http://placehold.it/250x150" class="radio-hover">
    Option - 2
  </label>
  
  <br>
  
  
    <img src="http://placehold.it/350x150" class="photo1" alt="">


  <script src="https://code.jquery.com/jquery-3.1.0.js"></script>
  
  <script>
    $(".radio-hover").hover(function(){
      var imageUrl = $(this).data("image");
      $("img").show();
      $("img").attr("src",imageUrl);
    },function(){
      $("img").hide();
    });
  </script>
</body>
</html>

1

solved check radio button when the mouse is over it [closed]