title: Change button link depending on which radio button is selected
body: <p>I have 5 radio buttons and depending of which one is selected I want to change the <code>href</code> link of an image, which sends you to another page. Example: I selected the first radio button. When I click the image, the page "gallery" opens. When I select the second radio button and press the image, it'll open the page "about me"... is there any solution for this with JavaScript?</p>
  
  <p>This is my radio set: </p>
  
  <pre><code>&lt;input checked="" type="radio" name="slider" id="slide1"&gt;
  &lt;input type="radio" name="slider" id="slide2"&gt;
  &lt;input type="radio" name="slider" id="slide3"&gt;
  &lt;input type="radio" name="slider" id="slide4"&gt;
  &lt;input type="radio" name="slider" id="slide5"&gt;
  &lt;input type="radio" name="slider" id="slide6"&gt;
  </code></pre>
  
  <p>and this is the button:</p>
  
  <pre><code>&lt;div id="down_icon2"&gt;
      &lt;a href=""&gt;
          &lt;img src="images/down_icon.png"&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>