Change Javascript variable image source based on radio button selection
<html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title> - jsFiddle demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="/css/result-light.css"> <style type="text/css"> </style> <script type="text/javascript">//<![CDATA[ $(window).load(function(){ $('.radio').on({ 'click': function(){ console.log($(this).val()); var image_url=$(this).val(); $('#my_image').attr('src',image_url); } }); });//]]> </script> </head> <body> <img id="my_image" src="http://i.imgur.com/tL6nW.gif"...